Subversion Repositories Scribus

Compare Revisions

Ignore whitespace Rev 24664 → Rev 24665

/trunk/Scribus/AppImage-package/bundle.sh
6,13 → 6,13
# if qt is not in the standard path, load its environment variables
. /opt/qt*/bin/qt*-env.sh || true
 
SCRIBUS_VERSION=nightly
 
########################################################################
# Build Plaform Theme for Gtk+
# https://askubuntu.com/a/910143
# https://askubuntu.com/a/748186
# Deploy with linuxdeployqt using
SCRIBUS_VERSION=nightly
 
########################################################################
# Build Platform Theme for Gtk+
# https://askubuntu.com/a/910143
# https://askubuntu.com/a/748186
# Deploy with linuxdeployqt using
# -extra-plugins=platformthemes/libqgtk2.so,styles/libqgtk2style.so
# At runtime, export QT_QPA_PLATFORMTHEME=gtk2 (Xfce does this itself)
########################################################################
/trunk/Scribus/BUILDING_win32_cmake.txt
1,7 → 1,7
BUILDING SCRIBUS ON MICROSOFT WINDOWS WITH CMAKE
================================================
 
Note : the informations provided in this file are outdated and kept for
Note : the information provided in this file are outdated and kept for
reference only. The preferred way to build Scribus on Windows is to use
Microsoft Visual Studio. Please read BUILDING_WIN32_msvc.txt for
instructions related to Visual Studio builds.
116,7 → 116,7
====================
 
This is a quick and dirty set of notes that will be filled out once everything's
verified as correct and working. It asssumes that you'll be building all your
verified as correct and working. It assumes that you'll be building all your
dependencies at a single root, like C:\Developer. The root *MUST* not have spaces
in its path.
 
/trunk/Scribus/BUILDING_win32_msvc.txt
102,7 → 102,7
Scribus\win32\msvc2017 or Scribus\win32\msvc2019 depending on the Visual Studio version you are using in a text editor.
Update the dependency paths to match your system.
 
Open the Visual Studio solution located in same directoy and start building. Note: if you built dependencies with a different
Open the Visual Studio solution located in same directory and start building. Note: if you built dependencies with a different
toolset than the default one, you should either modify toolset directly in all projects or build the solution through command
line using msbuild.
 
/trunk/Scribus/PACKAGING
41,7 → 41,7
-----------------------------------------------------------------------------
%description
Scribus is an desktop open source page layout program with the aim of producing
commerical grade output in PDF and Postscript, primarily, though not exclusively
commercial grade output in PDF and Postscript, primarily, though not exclusively
for Linux. Scribus runs natively on BSD, Linux, OS/2, Solaris, and Win32.
-----------------------------------------------------------------------------
 
/trunk/Scribus/README
109,13 → 109,13
- Macromedia FreeHand (FH*): An experimental import filter using libfreehand has been added.
- A filter for text files using Markdown as a formatting language has been added.
- Micrografx Draw (DRW): This a file format of the once popular Micrografx Draw graphics software for Windows 3 and 95. Since many vector collections using this format are still around, an import filter has been written.
- Microsoft Publisher (PUB): An importer for PUB files has been made possible by the creation of libmspub, wich is also used for Publisher import into LibreOffice. It is supposed to import all Publisher versions.
- Microsoft Publisher (PUB): An importer for PUB files has been made possible by the creation of libmspub, which is also used for Publisher import into LibreOffice. It is supposed to import all Publisher versions.
- Microsoft Visio (VSD, VXD): An importer for Visio files has been made possible by the creation of libvisio, which is also used for Visio import into LibreOffice. It is supposed to import at least Visio versions from 2000–2013.
- Microsoft Word XML (DOCX): MS Word's XML-based file format has become a new de-facto standard for word processing files. The new import filter supports at least DOCX files created with Word 2010 and later.
- Open Raster File (ORA): Open Raster is an open standard for complex bitmap files. It’s supported by all major Free image editors, including GIMP and Krita.
- Photoshop Custom Shapes (CSH): CSH is a vector format used for simple vector graphics collections in Adobe Photoshop. They can be imported via the new "Custom Shapes" manager.
- Progressive Graphics File (PGF): This is a fairly new image format, designed to replace JPEG, just like JPEG 2000 does, but emphasizing speed and quality over compression ratio.
- QuarkXPress (QXD): An importer for QuarkXPress files has been made possible by the creation of libqxp, wich is also used for QuarkXPress import into LibreOffice. It is supposed to import at least QuarkXPress versions 3.1–4.1.
- QuarkXPress (QXD): An importer for QuarkXPress files has been made possible by the creation of libqxp, which is also used for QuarkXPress import into LibreOffice. It is supposed to import at least QuarkXPress versions 3.1–4.1.
- Rich Text Format (RTF): One of the most widely used exchange formats for formatted text, RTF is also very common in DTP workflows and can be exported by almost every word processor since the 90s.
- StarView Metafile (SVM): This is an old Metafile format (similar to WMF) that was used by OpenOffice’s / LibreOffice’s predecessor StarOffice. Since both successors still use SVM in - OpenDocument Graphics, the SVM import filter was a by-product of the new ODG filter.
- UniConvertor Plug-in: As with the GraphicsMagick plug-in, Scribus won’t list any of the file types supported by UniConvertor to save space in file selectors. It will also ignore UniConvertor for importing file formats for which Scribus provides generic importers.
124,7 → 124,7
- Xara Designer (XAR): Xara Designer (formerly known as Xara Xtreme) is known as one of the most powerful vector drawing programs. Its file format (XAR) is well-documented, and thanks to many contributions from professional Xara users, the Scribus Team has been able to create an excellent XAR filter, whose implementation resulted in the addition of many new features in Scribus.
- XML Paper Specification (XPS, OXPS): XPS is an alternative to PDF originally developed by Microsoft and now maintained and updated by ECMA International. Scribus 1.5 can import both the original Microsoft version (XPS) and the modified versions as standardized by ECMA (OXPS).
- XPress Tags (XTG): XTG is a format created by Quark to exchange text layouts between documents. Scribus 1.5 provides an import filter for XTG files created by Quark XPress, which works almost flawlessly. Note that XPress Tags is not identical to Xtags, which is an enhanced version of XPress Tags provided by a third party via an XPress plug-in.
- Zoner Draw/Callisto (ZMF): An importer for Zoner Draw files has been made possible by the creation of libzmf, wich is also used for Zoner Draw import into LibreOffice. It is supposed to import at least Zoner Draw versions 4–5.
- Zoner Draw/Callisto (ZMF): An importer for Zoner Draw files has been made possible by the creation of libzmf, which is also used for Zoner Draw import into LibreOffice. It is supposed to import at least Zoner Draw versions 4–5.
 
==PDF Features==
 
142,7 → 142,7
 
- New icon set: As of version 1.5.1 Scribus uses a new and modern icon set. It's mostly in black and uses color only where necessary.
- Docked palettes: All palettes can now be docked to the right or left side of the screen space.
- Context-sensitive Palette: The Properties Palette has become a bit hard to use, due its many added functions. As as of version 1.5.6 all item-type-specific options have been removed from the PP. They are now available in a separate palette that will change its apperance depending on the kind of object you have selected.
- Context-sensitive Palette: The Properties Palette has become a bit hard to use, due its many added functions. As as of version 1.5.6 all item-type-specific options have been removed from the PP. They are now available in a separate palette that will change its appearance depending on the kind of object you have selected.
- Menu bar: The menu bar has been restructured and now takes less screen estate, as well as being much more clearly arranged.
- Context menu: The context menu has been redesigned and is now much smaller.
- Visual feedback for rejected fonts: As of version 1.5.6, you don't need to start Scribus from the command line to see which fonts where rejected by Scribus. In the font manager you'll find a new tab called "Rejected Fonts", which list all of them (if any).
/trunk/Scribus/TRANSLATION
126,13 → 126,13
Thai (th_TH)
Sira Nokyoungthong (gumara@msn.com)
Santhana Sriwanthana (sriwanthana@gmail.com)
 
Turkish (tr)
 
Ukranian (uk)
Oleksandr Moskalenko (malex@tagancha.org)
 
Welsh (cy)
 
Turkish (tr)
 
Ukrainian (uk)
Oleksandr Moskalenko (malex@tagancha.org)
 
Welsh (cy)
Kevin Donnelly (kevin@dotmon.com)
 
 
213,8 → 213,8
Göran Bondeson (goran@bondeson.net)
 
Turkish (tr)
Erkan Kaplan (Selamsana@uni.de)
Barış Atasoy (batasoy@pozitifpc.com)
 
Ukranian (uk)
Sergiy Kudryk (kudryk@yahoo.com)
Erkan Kaplan (Selamsana@uni.de)
Barış Atasoy (batasoy@pozitifpc.com)
 
Ukrainian (uk)
Sergiy Kudryk (kudryk@yahoo.com)
/trunk/Scribus/cmake/modules/old/FindPNG.cmake
7,7 → 7,7
# PNG_FOUND, If false, do not try to use PNG.
# also defined, but not for general use are
# PNG_LIBRARY, where to find the PNG library.
# None of the above will be defined unles zlib can be found.
# None of the above will be defined unless zlib can be found.
# PNG depends on Zlib
INCLUDE(FindZLIB)
 
/trunk/Scribus/dtd/scribus.dtd
40,11 → 40,11
<!-- Parsed entities that are used in many declarations -->
<!-- Object origin, e.g. ltop="Left Top corner" and so on. -->
<!ENTITY % origin "(ltop | rtop | lbottom | rbottom | center) 'ltop'">
<!-- Object origin co-ordinates on the horizontal axis. Default value reflects
<!-- Object origin coordinates on the horizontal axis. Default value reflects
the default units "pt". It is a real number of a form that depends on the
unit. -->
<!ENTITY % xorigin "xorigin CDATA '40'">
<!-- Object origin co-ordinates on the vertical axis. Default value reflects
<!-- Object origin coordinates on the vertical axis. Default value reflects
the default units "pt". It is a real number of a form that depends on the
unit. -->
<!ENTITY % yorigin "yorigin CDATA '40'">
145,7 → 145,7
<!ENTITY % pageobjectlist "imgframeobj*,textframeobj*,tableobj*,svgobject*,epsobject*">
<!ENTITY % canvasobjectlist "imgframe*,textframe*,table*,svgobject*,epsobject*">
 
<!-- Root element of a Scribus document. Contains all other elments, but only
<!-- Root element of a Scribus document. Contains all other elements, but only
"canvas" on which we put EVERYTHING else can be its child. -->
<!ELEMENT scribus (metadata,settings,colors,styles,canvas+,content*)>
 
/trunk/Scribus/scribus/actionmanager.cpp
901,7 → 901,7
name = "toolsPDFAnnot3D";
scrActions->insert(name, new ScrAction(ScrAction::DataInt, "16/annot3d.png", "22/annot3d.png", "", defaultKey(name), mainWindow, modeInsertPDF3DAnnotation));
#endif
//Set the applicaton wide palette shortcuts
//Set the application wide palette shortcuts
(*scrActions)["toolsProperties"]->setShortcutContext(Qt::ApplicationShortcut);
(*scrActions)["toolsContent"]->setShortcutContext(Qt::ApplicationShortcut);
(*scrActions)["toolsScrapbook"]->setShortcutContext(Qt::ApplicationShortcut);
/trunk/Scribus/scribus/canvas.cpp
1032,13 → 1032,13
for (int a = 0; a < docPagesCount; ++a)
{
DrawMasterItems(painter, m_doc->Pages->at(a), layer, QRect(clipx, clipy, clipw, cliph));
}
//first pass draws all except notes frames
DrawPageItems(painter, layer, QRect(clipx, clipy, clipw, cliph), false);
//seconf only for notes frames
DrawPageItems(painter, layer, QRect(clipx, clipy, clipw, cliph), true);
}
}
}
//first pass draws all except notes frames
DrawPageItems(painter, layer, QRect(clipx, clipy, clipw, cliph), false);
//second only for notes frames
DrawPageItems(painter, layer, QRect(clipx, clipy, clipw, cliph), true);
}
}
}
if (!m_viewMode.viewAsPreview)
DrawPageIndicator(painter, clip);
1396,13 → 1396,13
currItem->moveBy(-Mp->xOffset() + page->xOffset(), -Mp->yOffset() + page->yOffset(), true);
currItem->BoundingX = oldBX - Mp->xOffset() + page->xOffset();
currItem->BoundingY = oldBY - Mp->yOffset() + page->yOffset();
}
// Save PageItem's OwnPage and set its value to page number
// so that page number placed in text frames can work, also modify
// OwnPage of items embeded inside groups for same reason
currItem->savedOwnPage = currItem->OwnPage;
currItem->OwnPage = page->pageNr();
if (currItem->isGroup())
}
// Save PageItem's OwnPage and set its value to page number
// so that page number placed in text frames can work, also modify
// OwnPage of items embedded inside groups for same reason
currItem->savedOwnPage = currItem->OwnPage;
currItem->OwnPage = page->pageNr();
if (currItem->isGroup())
{
PageItem_Group *groupItem = currItem->asGroupFrame();
PageItemIterator itemIt(groupItem->groupItemList, PageItemIterator::IterateInGroups);
/trunk/Scribus/scribus/canvas.h
190,13 → 190,13
bool isPreviewMode() const { return m_viewMode.previewMode || m_viewMode.viewAsPreview; }
bool usePreviewVisual() const { return m_viewMode.viewAsPreview && m_viewMode.previewVisual != 0; }
int previewVisual() const { return m_viewMode.previewVisual; }
void setPreviewVisual(int mode);
void DrawMasterItems(ScPainter *painter, ScPage *page, ScLayer& layer, QRect clip);
//notesFramesPass determine if notes frames are drawed or not
void DrawPageItems(ScPainter *painter, ScLayer& layer, QRect clip, bool notesFramesPass);
void paintEvent ( QPaintEvent * p ) override;
void displayXYHUD(QPoint m);
void setPreviewVisual(int mode);
void DrawMasterItems(ScPainter *painter, ScPage *page, ScLayer& layer, QRect clip);
//notesFramesPass determine if notes frames are drawn or not
void DrawPageItems(ScPainter *painter, ScLayer& layer, QRect clip, bool notesFramesPass);
void paintEvent ( QPaintEvent * p ) override;
void displayXYHUD(QPoint m);
void displayCorrectedXYHUD(QPoint m, double x, double y);
void displayCorrectedSingleHUD(QPoint m, double val, bool isX);
void displayXYHUD(QPoint m, double x, double y);
/trunk/Scribus/scribus/canvasgesture_resize.cpp
620,7 → 620,7
// qDebug() << "constrained:" << m_bounds << double(m_bounds.width()) / m_bounds.height();
}
 
// shif key modifier
// shift key modifier
// move around around the pivot
if (centerPivot)
m_bounds.moveCenter(m_origBounds.center());
/trunk/Scribus/scribus/canvasmode_imageimport.cpp
236,7 → 236,7
qApp->processEvents(QEventLoop::ExcludeUserInputEvents);
m_doc->loadPict(fileName, currItem, false, true);
// Call to showScaleAndOffset() is now very likely unnecessary
// due to mecanisms used to update properties in PP in 1.5.x+
// due to mechanisms used to update properties in PP in 1.5.x+
// m_ScMW->contentPalette->update(currItem->isImageFrame());
m_ScMW->repaint();
qApp->processEvents(QEventLoop::ExcludeUserInputEvents);
/trunk/Scribus/scribus/canvasmode_normal.cpp
201,7 → 201,7
//mousePressEvent(m);
return;
}
//If we double click on an image frame and theres no image assigned, open the
//If we double click on an image frame and there's no image assigned, open the
//load picture dialog, else put it into edit mode if the frame is set to show the image
if (currItem->itemType() == PageItem::ImageFrame)
{
244,7 → 244,7
//if cursor is in mark`s place
m_ScMW->setTBvals(currItem);
//CB ignore the double click and go with a single one
//if we werent in mode edit before.
//if we weren't in mode edit before.
//unsure if this is correct, but its ok given we had no
//double click select until now.
// mousePressEvent(m);
/trunk/Scribus/scribus/cellarea.h
15,7 → 15,7
* The CellArea class is a simple representation of a rectangular area of table cells.
*
* CellArea is similar to QRect, but its contains() and intersects() semantics are a bit
* different and it has a couple of methods that are specifically taylored for table layout
* different and it has a couple of methods that are specifically tailored for table layout
* purposes. The class is used during table layout when keeping track of areas of merged
* table cells.
*/
/trunk/Scribus/scribus/chartablemodel.h
61,13 → 61,13
m_viewWidth = w;
};
 
public slots:
/*! \brief appends an unicode char into m_characters list.
\param s a QString with numerical representation of the character.
\param base an optional parameter containing base of the numerical converion. See QString::toInt() documentation.
The base parameter is used mainly in normal code - not in slot calls.
If user adds an already existing glyph it's rejected and the original
one is selected (see selectionChanged()).
public slots:
/*! \brief appends an unicode char into m_characters list.
\param s a QString with numerical representation of the character.
\param base an optional parameter containing base of the numerical conversion. See QString::toInt() documentation.
The base parameter is used mainly in normal code - not in slot calls.
If user adds an already existing glyph it's rejected and the original
one is selected (see selectionChanged()).
*/
void appendUnicode(const QString & s, uint base = 16);
 
/trunk/Scribus/scribus/colormgmt/scciedata.h
28,12 → 28,12
static void destroy();
 
/**
* @brief Retrive specific CIE illuminant
* @brief Retrieve specific CIE illuminant
*/
const ScCIEIlluminant& cieIlluminant(eIlluminant illuminant) const;
 
/**
* @brief Retrive specific CIE illuminant
* @brief Retrieve specific CIE illuminant
*/
const ScCIEObserver& cieObserver(eObserver observer) const;
/trunk/Scribus/scribus/desaxe/actions.h
52,7 → 52,7
* XML attributes or XML text to store this data in other objects. This is usually
* done in the end() method.
* Warning: end() methods are called in reverse order. This is to ensure that they
* see exactly the same stack content as their corresponging begin() method.
* see exactly the same stack content as their corresponding begin() method.
* This is the handle class which delegates to the body
*/
class Action
/trunk/Scribus/scribus/desaxe/saxio.h
39,7 → 39,7
*/
static const Xml_string saxxDefaultElem;
/**
Fills the digester with rules wich ensure that an object which was
Fills the digester with rules which ensure that an object which was
saved via saxx() will be reconstructed on top of the digester stack.
The prefix pattern shall be used to create patterns which constrain
the added rules to this context.
/trunk/Scribus/scribus/designer/README
12,6 → 12,6
 
Designer plugin dir on Suse: /usr/lib/qt4/plugins/designer/
 
The Scribus widgets are (suprisingly) in the "Scribus" group ;)
The Scribus widgets are (surprisingly) in the "Scribus" group ;)
 
Petr
/trunk/Scribus/scribus/documentchecker.h
30,7 → 30,7
class ScribusDoc;
 
/*! \brief It create a error/warning list for CheckDocument GUI class.
All errors and/or warnings are stored in errorCodes (inheritted QMap
All errors and/or warnings are stored in errorCodes (inherited QMap
see scribusstructs.h) and parsed into tree view in CheckDocument widgets.
*/
class SCRIBUS_API DocumentChecker
/trunk/Scribus/scribus/dtd/scribuspdfoptions.dtd
1,6 → 1,6
<!-- DTD for Scribus 1.3cvs PDF options -->
<!-- Craig Ringer - ringerc@scribus.info -->
<!-- Any modifcations of this file may require changes in
<!-- Any modifications of this file may require changes in
scribus/pdfoptions.h and scribus/pdfoptionsio.{cpp,h} -->
<!ELEMENT ScribusPDFOptions (thumbnails, articles, useLayers, compress, compressMethod, quality, recalcPic, bookmarks, picRes, pdfVersion, resolution, binding, embedFonts, subsetFonts, mirrorH, mirrorV, rotateDegrees, presentMode, presentationSettings, filename, isGrayscale, useRGB, useProfiles, useProfiles2, useLPI, lpiSettings, solidProf, sComp, imageProf, embeddedI, intent2, printProf, info, intent, bleedTop, bleedLeft, bleedRight, bleedBottom, encrypt, passOwner, passUser, permissions)>
<!ATTLIST ScribusPDFOptions version CDATA #REQUIRED>
/trunk/Scribus/scribus/exif.cpp
285,7 → 285,7
 
case M_JFIF:
// Regular jpegs always have this tag, exif images have the exif
// marker instead, althogh ACDsee will write images with both markers.
// marker instead, although ACDsee will write images with both markers.
// this program will re-create this marker on absence of exif marker.
// hence no need to keep the copy from the file.
break;
643,7 → 643,7
break;
 
case 3: FocalplaneUnits = 10; break; // centimeter
case 4: FocalplaneUnits = 1; break; // milimeter
case 4: FocalplaneUnits = 1; break; // millimeter
case 5: FocalplaneUnits = .001; break; // micrometer
}
break;
702,7 → 702,7
{
// In addition to linking to subdirectories via exif tags,
// there's also a potential link to another directory at the end of each
// directory. this has got to be the result of a comitee!
// directory. this has got to be the result of a committee!
unsigned char * SubdirStart;
unsigned Offset;
 
758,7 → 758,7
 
//--------------------------------------------------------------------------
// Process a COM marker. We want to leave the bytes unchanged. The
// progam that displays this text may decide to remove blanks, convert
// program that displays this text may decide to remove blanks, convert
// newlines, or otherwise modify the text. In particular we want to be
// safe for passing utf-8 text.
//--------------------------------------------------------------------------
838,7 → 838,7
// This is how far the interesting (non thumbnail) part of the exif went.
ExifSettingsLength = LastExifRefd - CharBuf;
 
// Compute the CCD width, in milimeters.
// Compute the CCD width, in millimeters.
if ( FocalplaneXRes != 0 )
{
ExifData::CCDWidth = ( float ) ( ExifImageWidth * FocalplaneUnits / FocalplaneXRes );
871,7 → 871,7
}
 
//--------------------------------------------------------------------------
// Contructor for initialising
// Constructor for initialising
//--------------------------------------------------------------------------
ExifData::ExifData()
{
/trunk/Scribus/scribus/exif.h
142,7 → 142,7
extern TagTable ProcessTable[];
 
//--------------------------------------------------------------------------
// Define comment writing code, impelemented in setcomment.c
// Define comment writing code, implemented in setcomment.c
extern int safe_copy_and_modify ( const char * original_filename, const char * comment );
 
#endif
/trunk/Scribus/scribus/fontlistmodel.h
14,13 → 14,13
#include "scfonts.h"
 
class ScribusDoc;
 
 
/*! \brief Model for font views.
It contains quite all informations about fonts available to display
in Qt4 views. It's suggested to use custom FontListView.
 
You can call view->hideColumn(ColumnType) to hide unneeded columns for
 
 
/*! \brief Model for font views.
It contains quite all information about fonts available to display
in Qt4 views. It's suggested to use custom FontListView.
 
You can call view->hideColumn(ColumnType) to hide unneeded columns for
user.
 
When user edits the allowed items (see flags()) it's promoted directly
/trunk/Scribus/scribus/imagedataloaders/scimgdataloader_jpeg.cpp
113,7 → 113,7
 
bool ScImgDataLoader_JPEG::preloadAlphaChannel(const QString& fn, int /*page*/, int res, bool& hasAlpha)
{
// No support for aplha in jpeg pictures
// No support for alpha in jpeg pictures
initialize();
hasAlpha = false;
return true;
/trunk/Scribus/scribus/imagedataloaders/scimgdataloader_pict.cpp
1611,7 → 1611,7
case 170: // picArrw1 Arrowhead on 2nd point of line
qDebug() << "Comment type: picArrw1";
break;
case 171: // picArrw2 Arrowhead on 1nd point of line
case 171: // picArrw2 Arrowhead on 1st point of line
qDebug() << "Comment type: picArrw2";
break;
case 172: // picArrw3 Arrowhead on both endpoints
/trunk/Scribus/scribus/langmgr.cpp
679,7 → 679,7
bool dictPathFound=findHyphDictionaries(dictionaryPaths);
if (!dictPathFound)
{
// qDebug()<<"No preinstalled hyphenation dictonaries or paths found";
// qDebug()<<"No preinstalled hyphenation dictionaries or paths found";
return;
}
QMap<QString, QString> dictionaryMap;
688,7 → 688,7
return;
 
QMap<QString, QString>::iterator it = dictionaryMap.begin();
// qDebug()<<"Installed Hyphenation Dictonaries:";
// qDebug()<<"Installed Hyphenation Dictionaries:";
while (it != dictionaryMap.end())
{
int j = langTableIndex(it.key());
708,7 → 708,7
bool dictPathFound=findSpellingDictionaries(dictionaryPaths);
if (!dictPathFound)
{
qDebug()<<"No preinstalled spelling dictonaries or paths found";
qDebug()<<"No preinstalled spelling dictionaries or paths found";
return;
}
QMap<QString, QString> dictionaryMap;
717,7 → 717,7
return;
 
QMap<QString, QString>::iterator it = dictionaryMap.begin();
// qDebug()<<"Installed Spelling Dictonaries:";
// qDebug()<<"Installed Spelling Dictionaries:";
while (it != dictionaryMap.end())
{
int j = langTableIndex(it.key());
/trunk/Scribus/scribus/loadsaveplugin.h
163,7 → 163,7
static QList<FileFormat> formats;
 
// Return an iterator referencing the first format structure named `name'.
// If specified, only return formats implmented by `plug'.
// If specified, only return formats implemented by `plug'.
// If `start' is specified, start searching at this iterator rather than the
// start of the list.
// The end iterator is returned if no match was found.
/trunk/Scribus/scribus/main_win32.cpp
148,7 → 148,7
\fn void setPythonEnvironment(const QString& appPath)
\author Jean Ghali
\date Sat Jul 03 23:00:00 CET 2009
\brief set the Python envirionment for Scribus
\brief set the Python environment for Scribus
\param appPath application Path
\retval None
*/
/trunk/Scribus/scribus/notesstyles.h
16,7 → 16,7
class PageItem_NoteFrame;
class PageItem_TextFrame;
 
//used for map with endnotes frames maped with range item
//used for map with endnotes frames mapped with range item
typedef union
{
void* P;
76,8 → 76,8
NumerationRange m_numRange {NSRdocument}; //range of numeration for current set
QString m_prefixStr;
QString m_suffixStr {")"};
bool m_autoNotesHeight {true}; //change height of notes frames to its content automaticaly?
bool m_autoNotesWidth {true}; //change width of notes frames automaticaly if width of master frame changes?
bool m_autoNotesHeight {true}; //change height of notes frames to its content automatically?
bool m_autoNotesWidth {true}; //change width of notes frames automatically if width of master frame changes?
bool m_autoRemoveEmptyNotesFrames {true};
bool m_autoWeldNotesFrames {true};
bool m_superscriptInNote {true};
/trunk/Scribus/scribus/numeration.h
65,9 → 65,9
 
//util functions for use without Numeration class
 
//convert passed num to a string useable when saving file
//convert passed num to a string usable when saving file
QString fromNumToString(NumFormat format);
//convert passed num to a string useable in a combobox
//convert passed num to a string usable in a combobox
QString fromNumToUserString(NumFormat format);
//convert string to its NumFormat representation
NumFormat fromStringToNum(const QString& str);
/trunk/Scribus/scribus/old/mspinbox.h
77,7 → 77,7
double minValue();
/*!
\author Franz Schmid
\brief Gets the Maximim Value of the Spinbox
\brief Gets the Maximum Value of the Spinbox
\retval The Value
*/
double maxValue();
/trunk/Scribus/scribus/pageitem.cpp
7416,7 → 7416,7
pageItemAttributes = *map;
}
 
//if not `prependCopy` then string "Copy of" wil not be prepended
//if not `prependCopy` then string "Copy of" will not be prepended
QString PageItem::generateUniqueCopyName(const QString& originalName, bool prependCopy) const
{
if (!m_Doc->itemNameExists(originalName))
/trunk/Scribus/scribus/pageitem.h
1151,7 → 1151,7
/** @brief Get the subclass item type
*
* This function should be used everywhere, where a itemType is required, but
* no C++ type informations is available. e.g. when saving files, etc.
* no C++ type information is available. e.g. when saving files, etc.
* It returns the same type as itemType() for the standard classes, but
* subclasses override it.
*/
/trunk/Scribus/scribus/pageitem_table.cpp
1416,7 → 1416,7
textFrame->itemText.deselectAll();
textFrame->HasSel = false;
 
// Set current style context befor assigning new active cell:
// Set current style context before assigning new active cell:
// if old active cell ref count is 1, the old context might be deleted
const ParagraphStyle& curStyle = newActiveCell.textFrame()->currentStyle();
m_Doc->currentStyle.setContext(curStyle.context());
/trunk/Scribus/scribus/pageitem_textframe.cpp
891,7 → 891,7
}
 
/**
Clones the tab fill char as often as necssary after all distances are known
Clones the tab fill char as often as necessary after all distances are known
*/
void fillInTabLeaders()
{
1006,7 → 1006,7
rightCorr *= 0.5;
else {
#if 0
// FIXME HOST: is the kerning with "." a realy reliable way to check this?
// FIXME HOST: is the kerning with "." a really reliable way to check this?
rightCorr = chStyle.font().realCharWidth(chr, chs / 10.0);
rightCorr -= chStyle.font().charWidth(chr, chs / 10.0, QChar('.'));
#else
1276,7 → 1276,7
//for moving next line if glyphs are higher than that
double lastLineY = 0;
 
QMap<int, Mark*> noteMarksPosMap; //maping notes marks and its position in text
QMap<int, Mark*> noteMarksPosMap; //mapping notes marks and its position in text
 
// dump styles
/*
1415,7 → 1415,7
current.mustLineEnd = current.colRight;
current.restartX = 0;
 
//why emit invalidating signals each time text is changed by appling styles?
//why emit invalidating signals each time text is changed by applying styles?
//this speed up layouting in case of using notes marks and drop caps
itemText.blockSignals(true);
setMaxY(-1);
2193,7 → 2193,7
//force break
if (!SpecialChars::isBreak(itemText.text(a), m_columns > 1))
{
//force line end at previouse glyph
//force line end at previous glyph
i--;
currentIndex = i - current.lineData.firstCluster;
a = (i >= 0) ? glyphClusters.at(i).firstChar() : (a - 1);
4498,7 → 4498,7
m_nextBox->updateLayout();
}
//check if cursor need to jump to next linked frame
//but not for notes frames can`t be updated as may disapper during update
//but not for notes frames can`t be updated as may disappear during update
if ((itemText.cursorPosition() > lastInFrame() + 1) && (lastInFrame() < (itemText.length() - 2)) && m_nextBox != nullptr)
{
view->deselectItems(true);
4842,7 → 4842,7
// Parameters
// PageItem *currItem text item to be processed
// inc < 0 for left key > 0 for right key
// if value is +/-1 work on slection
// if value is +/-1 work on selection
// if value is +/-2 refresh if text under cursor is selected -- not used
 
void PageItem_TextFrame::ExpandSel(int oldPos)
/trunk/Scribus/scribus/pageitem_textframe.h
76,7 → 76,7
using PageItem::invalidateLayout;
void layout() override;
 
//return true if all previouse frames from chain are valid (including that one)
//return true if all previous frames from chain are valid (including that one)
bool isValidChainFromBegin();
void setTextAnnotationOpen(bool open);
 
/trunk/Scribus/scribus/pagesize.cpp
89,7 → 89,7
 
if (!valuesSet)
{
//qDebug("Non-existant page size selected");
//qDebug("Non-existent page size selected");
m_width=m_height=0.0;
m_pageUnitIndex=-1;
m_pageSizeName=CommonStrings::customPageSize;
/trunk/Scribus/scribus/pagestructs.h
50,7 → 50,7
NumFormat type; //Type of section numbering, ie i,ii,iii or a,b,c or 1,2,3, etc
uint sectionstartindex; // Start of section, an index in the range of type, eg for type i,ii,iii, this would be 2 for "ii".
bool reversed; // Counting 10-1 ?
bool active; // Is the section active, ie, if the fromindex is 10, and theres 5 pages, this should be inactive.
bool active; // Is the section active, ie, if the fromindex is 10, and there's 5 pages, this should be inactive.
QChar pageNumberFillChar; //Prefix to be placed before page number
int pageNumberWidth; //Minimum width of page number string
 
/trunk/Scribus/scribus/pdf_analyzer.h
152,7 → 152,7
* Perform the actual inspection on one page of the PDF.
*
* \return A boolean is return indicating whether the process is successful.
* \param pageNum Specifying the page's number (zero-based) in the PDF where the analyzing process is opearted on.
* \param pageNum Specifying the page's number (zero-based) in the PDF where the analyzing process is operated on.
* \param usedColorSpaces List of used color spaces in the page which will be filled while processing.
* \param hasTransparency A boolean which will be set to true after analyzing if the page contains transparency.
* \param usedFonts List of used fonts in the page which will be filled while processing.
/trunk/Scribus/scribus/pdflib_core.cpp
5759,7 → 5759,7
// Cache of last foreground and background colours We cache fg and bg
// separately because they're alternated so much. The primary purpose of
// this cache is to avoid re-caculating the fg and bg colors on each char
// of text when the color doens't change.
// of text when the color doesn't change.
static QString lastFGColorName, lastFGOutput, lastBGColorName, lastBGOutput;
static int lastFGShade = -1, lastBGShade = -1;
if (fill && colorName == lastBGColorName && shade == lastBGShade)
/trunk/Scribus/scribus/pdfoptions.h
27,7 → 27,7
class MarginStruct;
 
/**
* @brief PDF Options struture. Capable of verifying its self, but otherwise largely
* @brief PDF Options structure. Capable of verifying its self, but otherwise largely
* a dumb struct.
*
* If you change this class, please ensure that PDFOptionsIO is
/trunk/Scribus/scribus/pluginmanager.cpp
693,7 → 693,7
QString PluginManager::getPluginPath(const QString & pluginName) const
{
// It is not legal to call this function without a valid
// plug in name.
// plugin name.
Q_ASSERT(pluginMap.contains(pluginName));
return pluginMap[pluginName].pluginFile;
}
701,7 → 701,7
bool & PluginManager::enableOnStartup(const QString & pluginName)
{
// It is not legal to call this function without a valid
// plug in name.
// plugin name.
Q_ASSERT(pluginMap.contains(pluginName));
return pluginMap[pluginName].enableOnStartup;
}
709,7 → 709,7
bool PluginManager::enabled(const QString & pluginName)
{
// It is not legal to call this function without a valid
// plug in name.
// plugin name.
Q_ASSERT(pluginMap.contains(pluginName));
return pluginMap[pluginName].enabled;
}
/trunk/Scribus/scribus/pluginmanager.h
140,7 → 140,7
 
protected:
/**
* \brief PluginData is structure for plugin related informations.
* \brief PluginData is structure for plugin related information.
* \param pluginFile path to the share library (with name).
* \param pluginName internal name of plug-in, used for prefix to dlsym() names
* \param pluginDLL reference to plug-in data for dynamic loading
/trunk/Scribus/scribus/plugins/barcodegenerator/barcode.ps
16790,7 → 16790,7
/dcpb dcws ecb1 ecb2 add idiv def % Base data codewords per block
/ecpb ncws ecb1 ecb2 add idiv dcpb sub def % Error correction codewords per block
 
% Complete the message bits by adding the terminator, truncated if neccessary
% Complete the message bits by adding the terminator, truncated if necessary
/term term 0 dmod msgbits length sub term length 2 copy gt {exch} if pop getinterval def
msgbits length term length add string
dup 0 msgbits putinterval
17439,7 → 17439,7
/fid () def
} ifelse
 
% Read the postcode, country code and service code fields seperated by GS
% Read the postcode, country code and service code fields separated by GS
msg <1d> search pop /pcode exch def
pop <1d> search pop /ccode exch def
pop <1d> search pop /scode exch def
21336,7 → 21336,7
} if
 
% Check for groups of blank rows unless data is encoded horizontally
% in a symbol of sufficent width to overcome up to six consecutive 0s
% in a symbol of sufficient width to overcome up to six consecutive 0s
% in two neighbouring 5 of 9 dot patterns
rows 2 mod 0 eq columns 12 le or {
/sum 0 def /p 0 def
/trunk/Scribus/scribus/plugins/barcodegenerator/barcodegenerator.h
80,7 → 80,7
QList<QString> encoderlist;
//! \brief Descriptions of each encoder.
QHash<QString, QString> resdescs;
//! \brief Dependancies of each encoder.
//! \brief Dependencies of each encoder.
QHash<QString, QString> resreqs;
//! \brief Example data input for each encoder.
QHash<QString, QString> resexams;
/trunk/Scribus/scribus/plugins/colorwheel/colorwheelwidget.h
76,7 → 76,7
\retval QString Translated method name. */
QString getTypeDescription(MethodType aType);
 
/** \brief Get sample color from specifid angle.
/** \brief Get sample color from specific angle.
\param angle Angle of the color in the wheel. An angle for transformation counting.
E.g. base angle is 30, param is 90 - transformation is 120.
There is easy "convert 665485 into 0-359 interval" algorithm too.
183,7 → 183,7
/** \brief Display user selection - selected colors.
Chosen colors are marked via bullets on the border of
the wheel.
\param angle angle of the drawed mark
\param angle angle of the drawn mark
\param base Draw it highlighted if it is base color
\param clear Draw point with white = clear it from painter
*/
/trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format_save.cpp
1449,7 → 1449,7
 
void Scribus150Format::writeMarks(ScXmlStreamWriter & docu)
{
//write list of definied marks to SLA
//write list of defined marks to SLA
if (m_Doc->marksList().isEmpty())
return;
 
/trunk/Scribus/scribus/plugins/formatidlist.h
3,7 → 3,7
 
/**
* \brief The IDs for the load/save format plugins. They must be a macro not a static const member
* because they must be available even when the specifid plugin is not linked in
* because they must be available even when the specified plugin is not linked in
* or even compiled.
*/
 
/trunk/Scribus/scribus/plugins/import/drw/importdrw.cpp
843,7 → 843,7
break;
case 32:
cmdText += "DRW Band";
/* For this record the documentation is completly wrong
/* For this record the documentation is completely wrong
 
offs meaning
0 X-Offset
/trunk/Scribus/scribus/plugins/import/idml_old/importidmlimpl.cpp
772,13 → 772,13
l=e.attribute("RightDirection","").split(" ");
p.Right.setX(l.at(0).toDouble());
p.Right.setY(l.at(1).toDouble());
return p;
}
/**
\brief A Funtion to find width
\return width as double if successful, else return -1
*/
 
return p;
}
/**
\brief A Function to find width
\return width as double if successful, else return -1
*/
 
double ImportIdmlImpl::findWidth(double x1, double y1, double x2, double y2)
{
if(x1==x2)
/trunk/Scribus/scribus/plugins/import/odg/importodg.cpp
3120,7 → 3120,7
//TODO
}
 
// split angles bigger than 90° so that it gives a good aproximation to the circle
// split angles bigger than 90° so that it gives a good approximation to the circle
double parts = ceil(qAbs(sweepAngle / 90.0));
 
double sa_rad = startAngle * M_PI / 180.0;
/trunk/Scribus/scribus/plugins/import/pct/importpct.cpp
2000,7 → 2000,7
case 170: // picArrw1 Arrowhead on 2nd point of line
// qDebug() << "Comment type: picArrw1";
break;
case 171: // picArrw2 Arrowhead on 1nd point of line
case 171: // picArrw2 Arrowhead on 1st point of line
// qDebug() << "Comment type: picArrw2";
break;
case 172: // picArrw3 Arrowhead on both endpoints
/trunk/Scribus/scribus/plugins/import/pdf/pdftextrecognition.cpp
289,7 → 289,7
* Move the position of the cursor to a new point,
* test if that point is within the current textframe or within a new textframe.
* initialize the textregion and setup lines and segments
* TODO: iscloseto x and y may need to be different from addGlyph but use thge common isRegionbConcurrent for now
* TODO: iscloseto x and y may need to be different from addGlyph but use the common isRegionbConcurrent for now
* need to check to see if we are creating a new paragraph or not.
* basically if the cursor is returned to x origin before it reached x width.
* Also needs to have support for rotated text, but I expect I'll add this by removing the text rotation
353,8 → 353,8
/*
* Add a new glyph to the current line segment, lines and segments should already have been setup by the
* moveto function which should generally be called prior to addGlyph to setup the lines and segments correctly.
* does some basic calculations to determine and save withs and heights and linespacings of texts etc...
* FIXME: these need to be changed to use the mode average of all glyps added to the text frame instead of just picking the first ones we come accross
* does some basic calculations to determine and save widths and heights and linespacings of texts etc...
* FIXME: these need to be changed to use the mode average of all glyps added to the text frame instead of just picking the first ones we come across
* the mode average can also be used to determine the base font style when fonts are added
* left and right hand margins however need to use the maximum and minimum, support for right hand justification
* and centered text needs to be added as we only support left and fully justified at the moment.
/trunk/Scribus/scribus/plugins/import/pdf/slaoutput.cpp
2873,7 → 2873,7
if (inPattern == 0)
{
outline.translate(xCoor - ite->xPos(), yCoor - ite->yPos());
// Undo the rotation of the clipping path as it is rotated together with the iamge.
// Undo the rotation of the clipping path as it is rotated together with the image.
QTransform mm;
mm.rotate(-ite->rotation());
outline = mm.map(outline);
/trunk/Scribus/scribus/plugins/import/ps/import.prolog
149,7 → 149,7
/i_shortcut false def
 
% defines an overloaded function name proc i_shortcutOverload -
% equvalent to /name { i_shortcut { //name } { proc } ifelse } bind def
% equivalent to /name { i_shortcut { //name } { proc } ifelse } bind def
/i_shortcutOverload
{
[ /i_shortcut /load load [ 5 index load ] cvx 4 index /ifelse load ] cvx
/trunk/Scribus/scribus/plugins/import/wmf/wmfimport.cpp
1192,7 → 1192,7
textString = QString::fromLocal8Bit(textArray.data());
 
QFontMetrics fm( m_context.font() );
int width = fm.horizontalAdvance(textString) + fm.descent(); // because fm.width(text) isn't rigth with Italic text
int width = fm.horizontalAdvance(textString) + fm.descent(); // because fm.width(text) isn't right with Italic text
/*int height = fm.height();
int ascent = fm.ascent();*/
 
/trunk/Scribus/scribus/plugins/picbrowser/README
6,15 → 6,15
2. Open scribus/plugins/CMakeLists.txt and add "ADD_SUBDIRECTORY(picturebrowser)"
3. Recompile Scribus (commands: "cmake", "make", "make install")
 
You will find the Picturebrowser at Extras/Picturebrowser
You will find the Picturebrowser at Extras/Picturebrowser
 
 
I didn't find out how to compile only the plugin yet, the tutorial with qmake specified here:
http://docs.scribus.net/index.php?lang=en&page=plugin_howto
 
does not seem to work. Maybe i will figure out later.
 
 
I didnt find out how to compile only the plugin yet, the tutorial with qmake specified here:
http://docs.scribus.net/index.php?lang=en&page=plugin_howto
 
does not seem to work. Maybe i will figure out later.
 
 
2. CHANGELOG (i would be glad about suggestions how to do things better here)
2.11
- a lot of things have changed:
82,13 → 82,13
The second problem was getting signals and threads to run in the context of the new thread, a new class had
to be defined ("loadImagesThreadInstance") which has the method to load an image and the signal to tell that
an image has been loaded. An instance of this class has to be created in the thread and then connected back
to the itemmodel to make signals/slots run in the new thread.
The third problem was the validity of the passed pointers. I pass the pointer of the previewImage Object
the image belongs to to the slot which loads the image, however if the user selects a new folder in the
meantime, the pointer is invalid and this will give us a segfault ocasionally. To prevent this, a unique
id is associated with every set of images ("pId"), and passed to the thread. If the id of the itemmodel changes,
the thread or the method which creates the icon knows and cancels.
The fourth issue was (and is) how to pass the image and other information between the threads, to copy all this
to the itemmodel to make signals/slots run in the new thread.
The third problem was the validity of the passed pointers. I pass the pointer of the previewImage Object
the image belongs to to the slot which loads the image, however if the user selects a new folder in the
meantime, the pointer is invalid and this will give us a segfault occasionally. To prevent this, a unique
id is associated with every set of images ("pId"), and passed to the thread. If the id of the itemmodel changes,
the thread or the method which creates the icon knows and cancels.
The fourth issue was (and is) how to pass the image and other information between the threads, to copy all this
results in poor performance. Passing pointers would make a very careful synchronising of threads necessary to
prevent simultaneous access. Im still working this out.
 
/trunk/Scribus/scribus/plugins/picbrowser/findimage.h
31,34 → 31,34
 
public:
//parameters:
//const QString& path2: path to be searched
//const QStringList& nameFilters2: namefilters for the images
//QDir::SortFlags sort2: sortflags
//bool searchSubfolders2: tells wether to search subfolders
findImagesThread ( const QString& path2, const QStringList& nameFilters2, QDir::SortFlags sort2, bool searchSubfolders2 );
//called after thread has been started
void run();
//const QString& path2: path to be searched
//const QStringList& nameFilters2: namefilters for the images
//QDir::SortFlags sort2: sortflags
//bool searchSubfolders2: tells whether to search subfolders
findImagesThread ( const QString& path2, const QStringList& nameFilters2, QDir::SortFlags sort2, bool searchSubfolders2 );
//called after thread has been started
void run();
//called when the thread should be restarted
void restart();
 
//finds the images in a given folder
void findFiles ( const QString& path );
 
//contains the images which have been found
QStringList imageFiles;
//tells wether the thread should restart
volatile bool restartThread;
 
private:
 
//contains the images which have been found
QStringList imageFiles;
//tells whether the thread should restart
volatile bool restartThread;
 
private:
//path to start searching
QString startPath;
//namefilters for search
QStringList nameFilters;
//sortflags for search
QDir::SortFlags sort;
//tells wether to search subfolders
bool searchSubfolders;
};
QStringList nameFilters;
//sortflags for search
QDir::SortFlags sort;
//tells whether to search subfolders
bool searchSubfolders;
};
 
 
 
#endif // FINDIMAGE_H
/trunk/Scribus/scribus/plugins/picbrowser/picturebrowser.cpp
171,7 → 171,7
collectionsWidget->setHeaderLabels(QStringList("Name"));
 
cdbFile = ScPaths::instance().pluginDataDir(true) + QString("collectionsdb.xml");
//emtpy initialization, maybe accessed before collection is actually loaded
//empty initialization, maybe accessed before collection is actually loaded
currCollection = new imageCollection;
currCollection->name = "empty";
currCollection->file = "empty";
310,7 → 310,7
 
void PictureBrowser::navigate(int index)
{
//this check shouldnt be necessary but you never know...
//this check shouldn't be necessary but you never know...
if ((index >= 0) && (index < 3))
{
if (index == 2)
357,7 → 357,7
 
void PictureBrowser::sortChanged(int index)
{
//this check shouldnt be necessary but you never know...
//this check shouldn't be necessary but you never know...
if ((index >= 0) && (index < 4))
{
pbSettings.sortSetting = index;
1024,7 → 1024,7
 
void PictureBrowser::filterCriteriaComboboxChanged(int index)
{
//this check shouldnt be necessary but you never know...
//this check shouldn't be necessary but you never know...
if ((index >= 0) && (index < 5))
{
filterStackedwidget->setCurrentIndex(index);
/trunk/Scribus/scribus/plugins/picbrowser/picturebrowser.h
118,13 → 118,13
signals:
//signal which posts a new job to the imageloading thread
//parameters:
//previewImage* imageToLoad: pointer to identify the previewimage
//QString path: path to the image
//int size: size of the icon, the returned QImage will be resized according to this
//int pId: a unique id to check wether the pointer is valid or a different set of images has been chosen while thread was executed
void loadImageJob ( int, QString, int, int );
//signals for selecting a page in the current document
void selectPage ( int );
//previewImage* imageToLoad: pointer to identify the previewimage
//QString path: path to the image
//int size: size of the icon, the returned QImage will be resized according to this
//int pId: a unique id to check whether the pointer is valid or a different set of images has been chosen while thread was executed
void loadImageJob ( int, QString, int, int );
//signals for selecting a page in the current document
void selectPage ( int );
void selectMasterPage ( QString );
 
public slots:
/trunk/Scribus/scribus/plugins/picbrowser/previewimage.h
79,13 → 79,13
//contains fileinformation
QFileInfo fileInformation;
//keeps imageinformation
ImageInformation *imgInfo;
//current size of previewIcon
int currentSize;
//tells wether previewIcon is loading in thread
bool previewImageLoading;
//tells if previewIcon was created previously or needs to be loaded
bool previewIconCreated;
ImageInformation *imgInfo;
//current size of previewIcon
int currentSize;
//tells whether previewIcon is loading in thread
bool previewImageLoading;
//tells if previewIcon was created previously or needs to be loaded
bool previewIconCreated;
//contains previewicon which is to be shown
QPixmap previewIcon;
//tags
106,24 → 106,24
void createPreviewImagesList ( const imageCollection *collection );
//deletes all entries
void clearPreviewImagesList();
 
//little helper function to reduce code
bool toRemove ( bool a, bool b );
//filters by filename, invert specifies whether to include or to remove file fileName
void filterFileName ( const QString &fileName, bool invert );
//filters by filesize, smallerThan specifies whether to include or to remove files smaller than fileSize
void filterFileSize ( qint64 fileSize, bool smallerThan );
//filters by filetype, invert specifies whether to include or to remove files with fileExtension
void filterFileType ( const QStringList &types, bool invert );
//filters by date last modified, smallerThan specifies whether to include or to remove files younger than modified
void filterFileModified ( const QDateTime &modified, bool smallerThan );
//filters by imageresolution, smallerThan specifies whether to include or to remove images with lower resolution
void filterResolution ( qint64 resolution, bool smallerThan );
//filters by tag, invert specifies whether to include or to remove item with tag
void filterTag ( const QStringList &tags, bool invert );
//clears all previously applied filters
void clearFilters();
 
//little helper function to reduce code
bool toRemove ( bool a, bool b );
//filters by filename, invert specifies wether to include or to remove file fileName
void filterFileName ( const QString &fileName, bool invert );
//filters by filesize, smallerThan specifies wether to include or to remove files smaller than fileSize
void filterFileSize ( qint64 fileSize, bool smallerThan );
//filters by filetype, invert specifies wether to include or to remove files with fileExtension
void filterFileType ( const QStringList &types, bool invert );
//filters by date last modified, smallerThan specifies wether to include or to remove files younger than modified
void filterFileModified ( const QDateTime &modified, bool smallerThan );
//filters by imageresolution, smallerThan specifies wether to include or to remove images with lower resolution
void filterResolution ( qint64 resolution, bool smallerThan );
//filters by tag, invert specifies wether to include or to remove item with tag
void filterTag ( const QStringList &tags, bool invert );
//clears all previously applied filters
void clearFilters();
 
//sorts previewImagesList after sort criteria
//0: sort by filename
//1: sort by fileextension
164,13 → 164,13
 
QMimeData *mimeData ( const QModelIndexList &indexes ) const;
QStringList mimeTypes() const;
 
//all our precious previewimages are indexed here
QList<previewImage *> modelItemsList;
//a unique id telling the thread wether to cancel current loading operations because files have changed
int pId;
 
private slots:
 
//all our precious previewimages are indexed here
QList<previewImage *> modelItemsList;
//a unique id telling the thread whether to cancel current loading operations because files have changed
int pId;
 
private slots:
//called when imageloadingthread has finished
//parameters:
//previewImage* loadedImage: pointer to identify the loaded image
/trunk/Scribus/scribus/plugins/plugins_pch.h
60,13 → 60,13
# include <limits.h>
# undef _POSIX_
#endif
 
#include <QCoreApplication>
#include <QList>
#include <QVariant> // All moc genereated code has this include
#include <QObject>
#include <QString>
#include <QStringList>
 
#include <QCoreApplication>
#include <QList>
#include <QVariant> // All moc generated code has this include
#include <QObject>
#include <QString>
#include <QStringList>
#include <QTextCodec>
 
#include <QApplication>
/trunk/Scribus/scribus/plugins/scripter/api_page.cpp
135,24 → 135,24
}
return l;
}
 
 
// copied from scripter/cmdutil.cpp
/// Convert an X co-ordinate part in page units to a document co-ordinate
/// in system units.
double PageAPI::pageXtoDocX(double x)
{
 
 
// copied from scripter/cmdutil.cpp
/// Convert an X coordinate part in page units to a document coordinate
/// in system units.
double PageAPI::pageXtoDocX(double x)
{
return x + ScCore->primaryMainWindow()->doc->currentPage()->xOffset();
}
 
 
// copied from scripter/cmdutil.cpp
/// Convert a Y co-ordinate part in page units to a document co-ordinate
/// in system units. The document co-ordinates have their origin somewere
/// up and left of the first page, where page co-ordinates have their
/// origin on the top left of the current page.
double PageAPI::pageYtoDocY(double y)
{
 
 
// copied from scripter/cmdutil.cpp
/// Convert a Y coordinate part in page units to a document coordinate
/// in system units. The document coordinates have their origin somewhere
/// up and left of the first page, where page coordinates have their
/// origin on the top left of the current page.
double PageAPI::pageYtoDocY(double y)
{
return y + ScCore->primaryMainWindow()->doc->currentPage()->yOffset();
}
 
/trunk/Scribus/scribus/plugins/scripter/apidocs.py
11,15 → 11,15
*/
 
The comment block has to start with two stars.
There is an empty line between the call-declaration and the description.
If an entry is a property, the second line should be "Property".
You should mention in the line below which type the property is.
Append (read-only) to this line, if you cannot change the propery.
"""
There is an empty line between the call-declaration and the description.
If an entry is a property, the second line should be "Property".
You should mention in the line below which type the property is.
Append (read-only) to this line, if you cannot change the property.
"""
 
import os
 
import os
 
 
class Entry(object):
 
 
/trunk/Scribus/scribus/plugins/scripter/python/excepthook.py
1,9 → 1,9
"""
Exception hook
If some unexpected error occures it can be shown in a nice looking dialog.
Especially useful is the traceback view.
 
Things to extend: Clicking on the filename should open an editor.
"""
Exception hook
If some unexpected error occurs it can be shown in a nice looking dialog.
Especially useful is the traceback view.
 
Things to extend: Clicking on the filename should open an editor.
Things to consider: Mail exceptions, copy to clipboard or send to bug tracker.
"""
import sys
/trunk/Scribus/scribus/plugins/scripter/python/excepthook.ui
22,7 → 22,7
<item row="0" column="0">
<widget class="QLabel" name="label">
<property name="text">
<string>An exception occured while running the script.</string>
<string>An exception occurred while running the script.</string>
</property>
</widget>
</item>
/trunk/Scribus/scribus/plugins/scripter/python/excepthook_ui.py
42,15 → 42,15
 
self.retranslateUi(ExceptHookDialog)
QtCore.QMetaObject.connectSlotsByName(ExceptHookDialog)
 
def retranslateUi(self, ExceptHookDialog):
ExceptHookDialog.setWindowTitle(QtGui.QApplication.translate("ExceptHookDialog", "Script error", None, QtGui.QApplication.UnicodeUTF8))
self.label.setText(QtGui.QApplication.translate("ExceptHookDialog", "An exception occurred while running the script.", None, QtGui.QApplication.UnicodeUTF8))
self.closeButton.setText(QtGui.QApplication.translate("ExceptHookDialog", "&Close", None, QtGui.QApplication.UnicodeUTF8))
self.exceptionLabel.setText(QtGui.QApplication.translate("ExceptHookDialog", "Exception", None, QtGui.QApplication.UnicodeUTF8))
self.detailsButton.setText(QtGui.QApplication.translate("ExceptHookDialog", "&Details >>", None, QtGui.QApplication.UnicodeUTF8))
 
def retranslateUi(self, ExceptHookDialog):
ExceptHookDialog.setWindowTitle(QtGui.QApplication.translate("ExceptHookDialog", "Script error", None, QtGui.QApplication.UnicodeUTF8))
self.label.setText(QtGui.QApplication.translate("ExceptHookDialog", "An exception occured while running the script.", None, QtGui.QApplication.UnicodeUTF8))
self.closeButton.setText(QtGui.QApplication.translate("ExceptHookDialog", "&Close", None, QtGui.QApplication.UnicodeUTF8))
self.exceptionLabel.setText(QtGui.QApplication.translate("ExceptHookDialog", "Exception", None, QtGui.QApplication.UnicodeUTF8))
self.detailsButton.setText(QtGui.QApplication.translate("ExceptHookDialog", "&Details >>", None, QtGui.QApplication.UnicodeUTF8))
 
 
if __name__ == "__main__":
import sys
app = QtGui.QApplication(sys.argv)
/trunk/Scribus/scribus/plugins/scripter/python/init_scripter.py
18,14 → 18,14
except ImportError, e:
print >> sys.stderr, "You seem to have Qt4 bindings without QtScript support."
print >> sys.stderr, "This is currently a requirement."
print >> sys.stderr, "Please make sure you have also libqt4-script installed."
raise
print >> sys.stderr, "Please make sure you have also libqt4-script installed."
raise
 
# Shows nice looking error dialog if an unhandled exception occurs.
import excepthook
excepthook.install()
 
 
# Shows nice looking error dialog if an unhandled exception occures.
import excepthook
excepthook.install()
 
 
# Make sure PyQt is new enough
if float(PYQT_VERSION_STR[:3]) < 4.4:
print >> sys.stderr, "Your installed PyQt4 is older than version 4.4"
/trunk/Scribus/scribus/plugins/scripter/python/mikro.py
176,14 → 176,14
return found
 
 
 
class Error(Exception):
"""
Base error classed. Catch this to handle exceptions coming from c++
"""
 
 
 
class Error(Exception):
"""
Base error classed. Catch this to handle exceptions comming from C++
"""
 
 
 
class PyQtClass(object):
"""
Base class
432,13 → 432,13
def create_pyqt_object(obj):
"""
Wrap a QObject and make all slots and properties dynamically available.
@type obj: QObject
@param obj: an unwrapped QObject
@rtype: PyQtClass object
@return: dynamicaly created object with all available properties and slots
This is probably the only function you need from this module.
Everything else are helper functions and classes.
@type obj: QObject
@param obj: an unwrapped QObject
@rtype: PyQtClass object
@return: dynamically created object with all available properties and slots
This is probably the only function you need from this module.
Everything else are helper functions and classes.
"""
cls = create_pyqt_class(obj.metaObject())
return cls(obj)
/trunk/Scribus/scribus/plugins/scripter/python/permitdlg.py
20,24 → 20,24
 
 
def __init__(self, filename, problems):
QDialog.__init__(self)
self.ui = Ui_PermitDialog()
self.ui.setupUi(self)
# XXX: re-enable later, remember does currently not work currectly
self.ui.rememberCheck.hide()
self.ui.filenameLabel.setText(filename)
# XXX: only show specific reasons for found problems
QDialog.__init__(self)
self.ui = Ui_PermitDialog()
self.ui.setupUi(self)
# XXX: re-enable later, remember does currently not work correctly
self.ui.rememberCheck.hide()
self.ui.filenameLabel.setText(filename)
# XXX: only show specific reasons for found problems
self.ui.problemsBrowser.setText("""
<i>Please look into the source for further investigation.</i>
<ul>
%s
</ul>
<p>To ensure safe execution importing external modules is not allowed by default
because external modules could access your system directly.
<br/>Additonally access to "private" attributes is not allowed because accessing
them could trigger side-effects which may help to break out of the sandbox.<br/>
Unfortunately exceptions are also a security problem because they can change
the control flow and you could access the stack frame.</p>
</ul>
<p>To ensure safe execution importing external modules is not allowed by default
because external modules could access your system directly.
<br/>Additionally access to "private" attributes is not allowed because accessing
them could trigger side-effects which may help to break out of the sandbox.<br/>
Unfortunately exceptions are also a security problem because they can change
the control flow and you could access the stack frame.</p>
""" % "".join(["<li>%s</li>" % p for p in problems]))
self.ui.problemsBrowser.hide()
self.resize(self.width(), self.sizeHint().height())
65,15 → 65,15
self.resize(self.width(), self.sizeHint().height())
 
 
 
def ask(filename, problems):
"""
Use this function
"""
return PermitDialog(filename, problems).exec_()
 
 
def ask(filename, problems):
"""
Use this fuction
"""
return PermitDialog(filename, problems).exec_()
 
 
 
if __name__ == "__main__":
# Demo:
import sys
/trunk/Scribus/scribus/plugins/scripter/python/safe_eval.py
22,13 → 22,13
'Safe' python code evaluation
 
Based on the public domain code of Babar K. Zafar
http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/496746
(version 0.1 or 1.2 May 27 2006)
 
The idea is to examine the compiled ast tree and chack for invalid
entries
 
I have removed the timeout checking as this probably isn't a serious
http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/496746
(version 0.1 or 1.2 May 27 2006)
 
The idea is to examine the compiled ast tree and check for invalid
entries
 
I have removed the timeout checking as this probably isn't a serious
problem for veusz documents
"""
 
55,13 → 55,13
# List of all builtin functions and types (ignoring exception classes).
all_builtins = [name for (name, obj) in inspect.getmembers(__builtin__)
if inspect.isbuiltin(obj) or
(inspect.isclass(obj) and not issubclass(obj, Exception))]
 
#----------------------------------------------------------------------
# Utilties.
#----------------------------------------------------------------------
 
def classname(obj):
(inspect.isclass(obj) and not issubclass(obj, Exception))]
 
#----------------------------------------------------------------------
# Utilities.
#----------------------------------------------------------------------
 
def classname(obj):
return obj.__class__.__name__
 
def get_node_lineno(node):
171,14 → 171,14
 
class SafeEvalError(object):
"""
Base class for all which occur while walking the AST.
 
Attributes:
errmsg = short decription about the nature of the error
lineno = line offset to where error occured in source code
"""
def __init__(self, errmsg, lineno):
self.errmsg, self.lineno = errmsg, lineno
Base class for all which occur while walking the AST.
 
Attributes:
errmsg = short description about the nature of the error
lineno = line offset to where error occurred in source code
"""
def __init__(self, errmsg, lineno):
self.errmsg, self.lineno = errmsg, lineno
def __str__(self):
return "line %d : %s" % (self.lineno, self.errmsg)
 
336,13 → 336,13
class SafeEvalException(Exception):
"Base class for all safe-eval related errors."
pass
 
class SafeEvalCodeException(SafeEvalException):
"""
Exception class for reporting all errors which occured while
validating AST for source code in safe_eval().
 
Attributes:
 
class SafeEvalCodeException(SafeEvalException):
"""
Exception class for reporting all errors which occurred while
validating AST for source code in safe_eval().
 
Attributes:
code = raw source code which failed to validate
errors = list of SafeEvalError
"""
351,13 → 351,13
def __str__(self):
return '\n'.join([str(err) for err in self.errors])
 
class SafeEvalContextException(SafeEvalException):
"""
Exception class for reporting unallowed objects found in the dict
intended to be used as the local enviroment in safe_eval().
 
Attributes:
keys = list of keys of the unallowed objects
class SafeEvalContextException(SafeEvalException):
"""
Exception class for reporting unallowed objects found in the dict
intended to be used as the local environment in safe_eval().
 
Attributes:
keys = list of keys of the unallowed objects
errors = list of strings describing the nature of the error
for each key in 'keys'
"""
365,26 → 365,26
self.keys, self.errors = keys, errors
def __str__(self):
return '\n'.join([str(err) for err in self.errors])
class SafeEvalTimeoutException(SafeEvalException):
"""
Exception class for reporting that code evaluation execeeded
the given timelimit.
 
Attributes:
class SafeEvalTimeoutException(SafeEvalException):
"""
Exception class for reporting that code evaluation exceeded
the given timelimit.
 
Attributes:
timeout = time limit in seconds
"""
def __init__(self, timeout):
self.timeout = timeout
def __str__(self):
return "Timeout limit execeeded (%s secs) during exec" % self.timeout
 
def exec_timed(code, context, timeout_secs):
"""
Dynamically execute 'code' using 'context' as the global enviroment.
SafeEvalTimeoutException is raised if execution does not finish within
the given timelimit.
"""
def __init__(self, timeout):
self.timeout = timeout
def __str__(self):
return "Timeout limit exceeded (%s secs) during exec" % self.timeout
 
def exec_timed(code, context, timeout_secs):
"""
Dynamically execute 'code' using 'context' as the global environment.
SafeEvalTimeoutException is raised if execution does not finish within
the given timelimit.
"""
assert(timeout_secs > 0)
 
signal_finished = False
412,13 → 412,13
'unallowed_builtins'. By default this means that code is not
allowed import modules or access dangerous builtins like 'open' or
'eval'. If code is considered 'safe' it will be executed via
'exec' using 'context' as the global environment. More details on
how code is executed can be found in the Python Reference Manual
section 6.14 (ignore the remark on '__builtins__'). The 'context'
enviroment is also validated and is not allowed to contain modules
or builtins. The following exception will be raised on errors:
 
if 'context' contains unallowed objects =
'exec' using 'context' as the global environment. More details on
how code is executed can be found in the Python Reference Manual
section 6.14 (ignore the remark on '__builtins__'). The 'context'
environment is also validated and is not allowed to contain modules
or builtins. The following exception will be raised on errors:
 
if 'context' contains unallowed objects =
SafeEvalContextException
 
if code is didn't validate and is considered 'unsafe' =
457,18 → 457,18
def test_builtin(self):
# attempt to access a unsafe builtin
self.assertRaises(SafeEvalException,
timed_safe_eval, "open('test.txt', 'w')")
 
def test_getattr(self):
# attempt to get arround direct attr access
self.assertRaises(SafeEvalException, \
timed_safe_eval, "getattr(int, '__abs__')")
 
def test_func_globals(self):
# attempt to access global enviroment where fun was defined
self.assertRaises(SafeEvalException, \
timed_safe_eval, "def x(): pass; print x.func_globals")
 
timed_safe_eval, "open('test.txt', 'w')")
 
def test_getattr(self):
# attempt to get around direct attr access
self.assertRaises(SafeEvalException, \
timed_safe_eval, "getattr(int, '__abs__')")
 
def test_func_globals(self):
# attempt to access global environment where fun was defined
self.assertRaises(SafeEvalException, \
timed_safe_eval, "def x(): pass; print x.func_globals")
 
def test_lowlevel(self):
# lowlevel tricks to access 'object'
self.assertRaises(SafeEvalException, \
483,14 → 483,14
def test_timeout_exceed(self):
# attempt to exectute code which never teminates
self.assertRaises(SafeEvalException, \
timed_safe_eval, "while 1: pass")
timed_safe_eval, "while 1: pass")
 
def test_invalid_context(self):
# can't pass an environment with modules or builtins
env = {'f' : __builtins__.open, 'g' : time}
self.assertRaises(SafeEvalException, \
timed_safe_eval, "print 1", env)
 
def test_invalid_context(self):
# can't pass an enviroment with modules or builtins
env = {'f' : __builtins__.open, 'g' : time}
self.assertRaises(SafeEvalException, \
timed_safe_eval, "print 1", env)
 
def test_callback(self):
# modify local variable via callback
self.value = 0
/trunk/Scribus/scribus/plugins/scripter/python/scribusscript.py
1,10 → 1,10
"""
Loader and handler for Scribus descriptor files/headers.
They help to integrate scripts into Scribus by defining menu-entries,
shortcuts, etc. Some additional metadata gives useful information and help.
 
See doc/TUTORIAL for a detailed explanation including examples.
"""
Loader and handler for Scribus descriptor files/headers.
They help to integrate scripts into Scribus by definining menu-entries,
shortcuts, etc. Some additional metadata gives useful information and help.
 
See doc/TUTORIAL for a detailed explanation including examples.
"""
import sys
import re
import os
/trunk/Scribus/scribus/plugins/scripter/python/scripter_runtime.py
266,8 → 266,8
run_func = lambda func, *args: func(*args)
if filename.endswith((".sqts", ".qts", ".sjs", ".js")):
run_func(run_qtscript, filename, subroutine, extension)
else:
run_func(run_python, filename, subroutine, extension)
if not background and not extension:
# XXX: make sure this is called if an exception occures...
cleanup()
else:
run_func(run_python, filename, subroutine, extension)
if not background and not extension:
# XXX: make sure this is called if an exception occurs...
cleanup()
/trunk/Scribus/scribus/plugins/scripter/utils.cpp
27,7 → 27,7
return value2pts(Val, ScCore->primaryMainWindow()->doc->unitIndex());
}
 
/// Convert an X co-ordinate part in page units to a document co-ordinate
/// Convert an X coordinate part in page units to a document coordinate
/// in system units.
double pageUnitXToDocX(double pageUnitX)
{
40,9 → 40,9
return PointToValue(pageUnitX - ScCore->primaryMainWindow()->doc->currentPage()->xOffset());
}
 
/// Convert a Y co-ordinate part in page units to a document co-ordinate
/// in system units. The document co-ordinates have their origin somewere
/// up and left of the first page, where page co-ordinates have their
/// Convert a Y coordinate part in page units to a document coordinate
/// in system units. The document coordinates have their origin somewhere
/// up and left of the first page, where page coordinates have their
/// origin on the top left of the current page.
double pageUnitYToDocY(double pageUnitY)
{
/trunk/Scribus/scribus/plugins/scripter/utils.h
9,21 → 9,21
 
#include "scripterimpl.h"
 
double PointToValue(double Val);
double ValueToPoint(double Val);
 
/*! \brief Convert an X co-ordinate part in page units to a document co-ordinate in system units.
*/
double pageUnitXToDocX(double pageUnitX);
/// \brief Doc units -> page-relative units
double docUnitXToPageX(double pageUnitX);
 
/*! \brief Convert a Y co-ordinate part in page units to a document co-ordinate
in system units. The document co-ordinates have their origin somewere
up and left of the first page, where page co-ordinates have their
origin on the top left of the current page. */
double pageUnitYToDocY(double pageUnitY);
/// \brief Doc units -> page-relative units
double PointToValue(double Val);
double ValueToPoint(double Val);
 
/*! \brief Convert an X coordinate part in page units to a document coordinate in system units.
*/
double pageUnitXToDocX(double pageUnitX);
/// \brief Doc units -> page-relative units
double docUnitXToPageX(double pageUnitX);
 
/*! \brief Convert a Y coordinate part in page units to a document coordinate
in system units. The document coordinates have their origin somewhere
up and left of the first page, where page coordinates have their
origin on the top left of the current page. */
double pageUnitYToDocY(double pageUnitY);
/// \brief Doc units -> page-relative units
double docUnitYToPageY(double pageUnitY);
 
int GetItem(QString Name);
/trunk/Scribus/scribus/plugins/scriptplugin/cmdgetsetprop.cpp
77,7 → 77,7
return nullptr;
objArg = nullptr; // no need to decref, it's borrowed
 
// Look up the property and retrive its type information
// Look up the property and retrieve its type information
const char* type = getpropertytype( (QObject*) obj, propertyname, includesuper);
if (type == nullptr)
{
217,7 → 217,7
return nullptr;
objArg = nullptr; // no need to decref, it's borrowed
 
// Retrive the object's meta object so we can query it
// Retrieve the object's meta object so we can query it
const QMetaObject* objmeta = obj->metaObject();
if (!objmeta)
return nullptr;
/trunk/Scribus/scribus/plugins/scriptplugin/cmdobj.cpp
673,7 → 673,7
/*
* Craig Ringer, 2004-09-09
* Apply the named style to the currently selected object.
* pv, 2004-09-13, optionaly param objectName + "check the page" stuff
* pv, 2004-09-13, optionally param objectName + "check the page" stuff
*/
PyObject *scribus_setparagraphstyle(PyObject* /* self */, PyObject* args)
{
749,7 → 749,7
/*
* Jean Ghali, 2017-07-18
* Apply the named character style to the currently selected object.
* pv, 2004-09-13, optionaly param objectName + "check the page" stuff
* pv, 2004-09-13, optionally param objectName + "check the page" stuff
*/
PyObject *scribus_setcharstyle(PyObject* /* self */, PyObject* args)
{
/trunk/Scribus/scribus/plugins/scriptplugin/cmdobj.h
306,7 → 306,7
/**
Craig Ringer, 2004-09-09
Apply the named style to the currently selected object.
pv, 2004-09-13, optionaly param objectName + "check the page" stuff
pv, 2004-09-13, optionally param objectName + "check the page" stuff
*/
PyObject *scribus_setparagraphstyle(PyObject * /*self*/, PyObject* args);
 
/trunk/Scribus/scribus/plugins/scriptplugin/cmdpage.h
150,7 → 150,7
See UNIT_<type> constants and getPageMargins()\n\
"));
/**
returns a tuple with page domensions in used system
returns a tuple with page dimensions in used system
e.g. when is the doc in picas returns picas ;)
(Petr Vanek 02/17/04)
*/
/trunk/Scribus/scribus/plugins/scriptplugin/cmdstyle.h
41,7 → 41,7
dropcapoffset [optional] -> offset of the caps if used\n\n\
\"charstyle\" [optional] -> char style to use\n\n\
\"bullet\" [optional] -> string to use as bullet\n\n\
\"tabs\" [optional] -> a list containg tab definitions\n\n\
\"tabs\" [optional] -> a list containing tab definitions\n\n\
-> a tab is defined as a tuple with the following format (position,type,fillchar)\"\n\n\
-> position [required] -> float value for the position\n\n\
-> type [optional] -> left: 0 [default], right: 1, period: 2, comma: 3, center: 4\n\n\
60,7 → 60,7
\"name\" [required] -> name of the char style to create\n\n\
\"font\" [optional] -> name of the font to use\n\n\
fontsize [optional] -> font size to set (double)\n\n\
\"features\" [optional] -> nearer typographic details can be defined by a string that might contain the following phrases comma-seperated (without spaces!):\n\n\
\"features\" [optional] -> nearer typographic details can be defined by a string that might contain the following phrases comma-separated (without spaces!):\n\n\
-> inherit\n\n\
-> bold\n\n\
-> italic\n\n\
/trunk/Scribus/scribus/plugins/scriptplugin/cmdutil.cpp
30,7 → 30,7
return value2pts(Val, ScCore->primaryMainWindow()->doc->unitIndex());
}
 
/// Convert an X co-ordinate part in page units to a document co-ordinate
/// Convert an X coordinate part in page units to a document coordinate
/// in system units.
double pageUnitXToDocX(double pageUnitX)
{
43,9 → 43,9
return PointToValue(pageUnitX - ScCore->primaryMainWindow()->doc->currentPage()->xOffset());
}
 
/// Convert a Y co-ordinate part in page units to a document co-ordinate
/// in system units. The document co-ordinates have their origin somewere
/// up and left of the first page, where page co-ordinates have their
/// Convert a Y coordinate part in page units to a document coordinate
/// in system units. The document coordinates have their origin somewhere
/// up and left of the first page, where page coordinates have their
/// origin on the top left of the current page.
double pageUnitYToDocY(double pageUnitY)
{
233,7 → 233,7
return border;
}
 
// Parse each tuple decribing a border line and append it to the border.
// Parse each tuple describing a border line and append it to the border.
int nBorderLines = PyList_Size(borderLinesList);
for (int i = 0; i < nBorderLines; ++i)
{
/trunk/Scribus/scribus/plugins/scriptplugin/cmdutil.h
13,15 → 13,15
double PointToValue(double Val);
double ValueToPoint(double Val);
 
/*! \brief Convert an X co-ordinate part in page units to a document co-ordinate in system units.
/*! \brief Convert an X coordinate part in page units to a document coordinate in system units.
*/
double pageUnitXToDocX(double pageUnitX);
/// \brief Doc units -> page-relative units
double docUnitXToPageX(double pageUnitX);
 
/*! \brief Convert a Y co-ordinate part in page units to a document co-ordinate
in system units. The document co-ordinates have their origin somewere
up and left of the first page, where page co-ordinates have their
/*! \brief Convert a Y coordinate part in page units to a document coordinate
in system units. The document coordinates have their origin somewhere
up and left of the first page, where page coordinates have their
origin on the top left of the current page. */
double pageUnitYToDocY(double pageUnitY);
/// \brief Doc units -> page-relative units
/trunk/Scribus/scribus/plugins/scriptplugin/cmdvar.h
48,7 → 48,7
 
class ScripterCore;
 
// Globals for testing Qt properties and probably other more intresting future
// Globals for testing Qt properties and probably other more interesting future
// uses.
/** @brief A PyCObject containing a pointer to qApp */
extern PyObject* wrappedQApp;
77,7 → 77,7
/*! Exception raised when the user tries to create an object with the same name as one that already exists */
extern PyObject* NameExistsError;
 
/*! A helper variable for better string comparsions to reduce warnings:
/*! A helper variable for better string comparisons to reduce warnings:
"warning: comparison with string literal results in unspecified behaviour"
what is criticised by some linux distributors */
#ifndef EMPTY_STRING
/trunk/Scribus/scribus/plugins/scriptplugin/objimageexport.h
32,7 → 32,7
PyDoc_STRVAR(imgexp_dpi__doc__, "This value will be used for export as DPI. Read/write integer.");
PyDoc_STRVAR(imgexp_filename__doc__, "Filename of the image. With or without path. Read/write string.");
PyDoc_STRVAR(imgexp_quality__doc__, "Quality/compression: minimum 1 (poor), maximum 100 (qaulity). Read/write integer.");
PyDoc_STRVAR(imgexp_scale__doc__, "This is the scaling of the image. 100 = 100% etc. Read/write iteger.");
PyDoc_STRVAR(imgexp_scale__doc__, "This is the scaling of the image. 100 = 100% etc. Read/write integer.");
PyDoc_STRVAR(imgexp_transparentBkgnd__doc__, "Enable or disable transparent background.");
PyDoc_STRVAR(imgexp_type__doc__, "Bitmap type. See allTypes list for more info. Read/write string.");
 
/trunk/Scribus/scribus/plugins/scriptplugin/objpdffile.cpp
347,7 → 347,7
ScribusDoc* currentDoc = ScCore->primaryMainWindow()->doc;
PDFOptions& pdfOptions = currentDoc->pdfOptions();
 
// Defaut save into file
// Default save into file
QString tf = pdfOptions.fileName;
if (tf.isEmpty())
{
1049,13 → 1049,13
PyObject *tmp = PyList_GetItem(value, i);
if (!PyList_Check(tmp))
{
PyErr_SetString(PyExc_TypeError, "elemets of 'effval' must be list of five integers.");
PyErr_SetString(PyExc_TypeError, "elements of 'effval' must be list of five integers.");
return -1;
}
int j = PyList_Size(tmp);
if (j != 6)
{
PyErr_SetString(PyExc_TypeError, "elemets of 'effval' must have exactly six integers.");
PyErr_SetString(PyExc_TypeError, "elements of 'effval' must have exactly six integers.");
return -1;
}
for (--j; j > -1; --j)
1492,7 → 1492,7
PyObject *ti = PyList_GetItem(self->effval, i);
if (!ti)
continue;
// Do I Need to check if every PyLong_AsLong and PyList_GetItem funtion succeed???
// Do I Need to check if every PyLong_AsLong and PyList_GetItem function succeed???
t.pageEffectDuration = PyLong_AsLong(PyList_GetItem(ti, 0));
t.pageViewDuration = PyLong_AsLong(PyList_GetItem(ti, 1));
t.effectType = PyLong_AsLong(PyList_GetItem(ti, 2));
/trunk/Scribus/scribus/plugins/scriptplugin/objprinter.cpp
154,7 → 154,7
PyObject *tmp2 = PyUnicode_FromString("File");
PyList_Append(self->allPrinters, tmp2);
Py_DECREF(tmp2);
// as defaut set to print into file
// as default set to print into file
PyObject *printer = nullptr;
printer = PyUnicode_FromString("File");
if (printer) {
/trunk/Scribus/scribus/plugins/scriptplugin/samples/ExtractText.py
9,14 → 9,14
 
this version 2008.02.28
 
This program is free software; you can redistribute it and/or modify
it under the terms of the GPL, v2 (GNU General Public License as published by
the Free Software Foundation, version 2 of the License), or any later version.
See the Scribus Copyright page in the Help Browser for further informaton
about GPL, v2.
This program is free software; you can redistribute it and/or modify
it under the terms of the GPL, v2 (GNU General Public License as published by
the Free Software Foundation, version 2 of the License), or any later version.
See the Scribus Copyright page in the Help Browser for further information
about GPL, v2.
 
SYNOPSIS
 
SYNOPSIS
 
This script takes the current document and extracts all the text from text frames,
and also gets the pathnames to all images. This is then saved to a file named
by the user.
/trunk/Scribus/scribus/plugins/scriptplugin/samples/sample_db_usage.py
77,7 → 77,7
# get the list of the databases
# it's like 'select * from dba_tables' in Oracle
count = cur.execute('show tables')
# formating the output
# formatting the output
result = str(count) + ' table(s) in the ' + dbname + ' database.\n\n'
for i in cur.fetchall():
result = result + i[0] + '\n'
/trunk/Scribus/scribus/plugins/scriptplugin/scriptercore.cpp
40,7 → 40,7
#include "prefscontext.h"
#include "prefstable.h"
#include "prefsmanager.h"
#include "scribusapp.h" // need it to acces ScQApp->pythonScript & ScQApp->pythonScriptArgs
#include "scribusapp.h" // need it to access ScQApp->pythonScript & ScQApp->pythonScriptArgs
 
ScripterCore::ScripterCore(QWidget* parent)
{
322,7 → 322,7
if (!ScCore->usingGUI())
cm += QString(" traceback.print_exc()\n");
// We re-raise the exception so the return value of PyRun_StringFlags reflects
// the fact that an exception has ocurred.
// the fact that an exception has occurred.
cm += QString(" raise\n");
// FIXME: if cmd contains chars outside 7bit ascii, might be problems
QByteArray cmd = cm.toUtf8();
338,7 → 338,7
if (errorMsgPyStr == nullptr)
{
// It's rather unlikely that this will ever be reached - to get here
// we'd have to fail to retrive the string we just created.
// we'd have to fail to retrieve the string we just created.
qDebug("Error retrieving error message content after script exception!");
qDebug("Exception was:");
PyErr_Print();
/trunk/Scribus/scribus/plugins/scriptplugin/scriptplugin.cpp
252,7 → 252,7
// Alas, there's a lot of wasteful string copying going on
// here.
QString translated = QObject::tr(docstringConstant, "scripter docstring");
// pv - hack for ugly formating in console removing
// pv - hack for ugly formatting in console removing
translated.replace("\n\n", "<P>");
translated.replace('\n', " ");
translated.replace("<P>", "\n\n");
/trunk/Scribus/scribus/plugins/scriptplugin/scripts/Align_image_in_frame.py
34,13 → 34,13
class TkImageAlignmentWizard(Frame):
""" GUI interface for aligning an image in a frame"""
def __init__(self, master=None):
""" Setup the dialog """
# refernce to the localization dictionary
self.key = 'English'
Frame.__init__(self, master)
self.grid()
def __init__(self, master=None):
""" Setup the dialog """
# reference to the localization dictionary
self.key = 'English'
Frame.__init__(self, master)
self.grid()
self.master.geometry('120x120-80+40')
self.master.title('Scribus Image Alignment Wizard')
#define widgets
/trunk/Scribus/scribus/plugins/scriptplugin/scripts/ColorChart.py
290,13 → 290,13
scribus.statusMessage("Drawing color fields...")
stepCompleted=0
#disable redrawing for better performance
scribus.setRedraw(False)
for color in colorList:
if (vSpaceUsedByField * (colorFieldCounter+1)) <= vSpaceAvailable:
# when there is enought space left draw a color field...
 
#calculate Position for new colorField
h=leftMargin
scribus.setRedraw(False)
for color in colorList:
if (vSpaceUsedByField * (colorFieldCounter+1)) <= vSpaceAvailable:
# when there is enough space left draw a color field...
 
#calculate Position for new colorField
h=leftMargin
v=topMargin + (vSpaceUsedByField * colorFieldCounter)+HEADERSIZE
#draw the colorField
drawColor(color, h, v, colorFieldWidth, COLOR_FIELD_HEIGHT)
315,13 → 315,13
colorFieldCounter = colorFieldCounter+1
 
#update progressbar
stepCompleted = stepCompleted+1
scribus.progressSet(stepCompleted)
 
#make shure pages are redrawn
scribus.setRedraw(True)
 
 
stepCompleted = stepCompleted+1
scribus.progressSet(stepCompleted)
 
#make sure pages are redrawn
scribus.setRedraw(True)
 
 
def main(argv):
"""just invokes createChart() and displays a message after the chart is finished."""
createChart()
/trunk/Scribus/scribus/plugins/scriptplugin/scripts/Ligatursatz.py
193,7 → 193,7
# points[1] = points[2] = points[-2] = points[-3] = 0
# But it is necessary to do at least this, just to avoid empty
# pieces. Otherwise, the pattern “von1” would lead for the
# word “von” to the result “[u"von", u""]” which is not intented.
# word “von” to the result “[u"von", u""]” which is not intended.
points[1] = 0
points[-2] = 0
# Examine the points to build the pieces list.
326,7 → 326,7
 
4.) Combine both, “wortliste” and “pre-1901” in one single file
> cat ../wortliste/wortliste ../wortliste/pre-1901 > full-list.utf8
The other available word lists currently do not provide informations
The other available word lists currently do not provide information
about morpheme boundaries, so it does not make sense to use them.
 
5.) Preprocess it
22235,7 → 22235,7
This is the content of the file “german.tr” of the Trennmuster
project (both capital letters and small letters), adding LATIN
CAPITAL LETTER SHARP S (ẞ) and LATIN SMALL LETTER LONG S (ſ). So it
contains all characters that occure in the original word list from
contains all characters that occurred in the original word list from
which the patterns are generated. (So it is likely
that is contains more characters than the patterns itself.)
 
22276,7 → 22276,7
all characters starting from this index position shifting to the
right. False means that at this index there is a ZWNJ and this
ZWNJ has to be removed. None means that nothing has to be done.
Of course, the list might be emtpy if my_word is empty. my_word
Of course, the list might be empty if my_word is empty. my_word
is supposed to contain a single word, and not various words with
whitespace. This function handles correctly the soft hyphen
U+00AD and the following characters with canonical decomposition:
22291,13 → 22291,13
# Handle normalization…
#
# The string is yet folded, so only small letters need to be
# handeled. We substitute the decomposed form by the composed
# handled. We substitute the decomposed form by the composed
# form (that is used in the pattern). To avoid a different
# character count, we introduce a soft hyphen. This is okay,
# because the soft hyphen will be ignored later anyway, and
# ZWNJ are always inserted before normal characters and never
# before soft hyphens. We handle only the minimum of
# canonical composition that really occures in our pattern.
# canonical composition that really occurs in our pattern.
#
# WARNING: This must be kept in synch with
# GermanLigatureSupport.get_word_characters().
22537,7 → 22537,7
(constructor argument) currently exists in the current document,
and it refers to a text frame.
Postcondition: Returns an integer that represents the length
of the text. The mesurement unit of the length is provided
of the text. The measurement unit of the length is provided
by Scribus. It is in Scribus 1.5.2 not “Unicode Scalar Values”,
but “UTF16 code units”.
"""
22623,7 → 22623,7
# However, we have made sure earlier that only Unicode
# Scalar Values inside BMP are in used_characters, so
# it is guaranteed that here the indexes are the same,
# wether it is UTF16 or UTF32. So we can savely use
# whether it is UTF16 or UTF32. So we can savely use
# these indexes to do our modifications in Scribus.
if instruction_list[j] == True:
# Insert here a ZWNJ.
22784,7 → 22784,7
# for the hole story (means, also for all linked text
# frames). Result: If the user has selected various linked
# text frames of the same story, than we do all the same
# work various times. That’s quite inefficent, but however
# work various times. That’s quite inefficient, but however
# I don’t know how to prevent this.
ligature_setting_for_story(my_textframe, my_provider)
# Clean the text selection for this Scribus object
/trunk/Scribus/scribus/plugins/scriptplugin/scripts/csv2color.py
8,14 → 8,14
csv2color.py allows a user to import colors from a given csv file into a scribus document.
The file must be a text file with comma separated values in the following format:
 
"colorname", c,m,y,k
"colorname", c,m,y,k
 
There must be a document opend in scribus where the colors can be defined in.
If the csv contains one or more color names that already exist in the document, the colors will be imported with a `*` as prefix.
 
This script is especially helpful if you want to use CMYK color representations of color systems like HKS, Pantone or RAL in Scribus. Lots of such CMYK translation tables can be found on the Web.
One can easily copy such a table into a text file, save it in the obove described format and import it into a scribus document.
 
There must be a document opend in scribus where the colors can be defined in.
If the csv contanins one or more color names that already exist in the document, the colors will be imported with a `*` as prefix.
 
This script is especially helpful if you want to use CMYK color representations of color systems like HKS, Pantone or RAL in Scribus. Lots of such CMYK translation tables can be found on the Web.
One can easily copy such a table into a text file, save it in the obove described format and import it into a scribus document.
 
Use color2csv to export the colors from a scribus document into a csv file.
 
############################
/trunk/Scribus/scribus/plugins/scriptplugin/scripts/importcsv2table.py
79,13 → 79,13
 
#########################
# YOUR IMPORTS GO HERE #
#########################
import csv
 
#get information about the area where the bale should be drawed
def getPosition():
if scribus.selectionCount() == 1:
areaname = scribus.getSelectedObject()
#########################
import csv
 
#get information about the area where the bale should be drawn
def getPosition():
if scribus.selectionCount() == 1:
areaname = scribus.getSelectedObject()
position= scribus.getPosition(areaname)
vpos = position[1]
hpos = position[0]
/trunk/Scribus/scribus/plugins/scriptplugin_py2x/cmdgetsetprop.cpp
77,7 → 77,7
return nullptr;
objArg = nullptr; // no need to decref, it's borrowed
 
// Look up the property and retrive its type information
// Look up the property and retrieve its type information
const char* type = getpropertytype( (QObject*)obj, propertyname, includesuper);
if (type == nullptr)
{
217,7 → 217,7
return nullptr;
objArg = nullptr; // no need to decref, it's borrowed
 
// Retrive the object's meta object so we can query it
// Retrieve the object's meta object so we can query it
const QMetaObject* objmeta = obj->metaObject();
if (!objmeta)
return nullptr;
/trunk/Scribus/scribus/plugins/scriptplugin_py2x/cmdobj.cpp
673,7 → 673,7
/*
* Craig Ringer, 2004-09-09
* Apply the named style to the currently selected object.
* pv, 2004-09-13, optionaly param objectName + "check the page" stuff
* pv, 2004-09-13, optionally param objectName + "check the page" stuff
*/
PyObject *scribus_setparagraphstyle(PyObject* /* self */, PyObject* args)
{
749,7 → 749,7
/*
* Jean Ghali, 2017-07-18
* Apply the named character style to the currently selected object.
* pv, 2004-09-13, optionaly param objectName + "check the page" stuff
* pv, 2004-09-13, optionally param objectName + "check the page" stuff
*/
PyObject *scribus_setcharstyle(PyObject* /* self */, PyObject* args)
{
/trunk/Scribus/scribus/plugins/scriptplugin_py2x/cmdobj.h
306,7 → 306,7
/**
Craig Ringer, 2004-09-09
Apply the named style to the currently selected object.
pv, 2004-09-13, optionaly param objectName + "check the page" stuff
pv, 2004-09-13, optionally param objectName + "check the page" stuff
*/
PyObject *scribus_setparagraphstyle(PyObject * /*self*/, PyObject* args);
 
/trunk/Scribus/scribus/plugins/scriptplugin_py2x/cmdpage.h
150,7 → 150,7
See UNIT_<type> constants and getPageMargins()\n\
"));
/**
returns a tuple with page domensions in used system
returns a tuple with page dimensions in used system
e.g. when is the doc in picas returns picas ;)
(Petr Vanek 02/17/04)
*/
/trunk/Scribus/scribus/plugins/scriptplugin_py2x/cmdstyle.h
41,7 → 41,7
dropcapoffset [optional] -> offset of the caps if used\n\n\
\"charstyle\" [optional] -> char style to use\n\n\
\"bullet\" [optional] -> string to use as bullet\n\n\
\"tabs\" [optional] -> a list containg tab definitions\n\n\
\"tabs\" [optional] -> a list containing tab definitions\n\n\
-> a tab is defined as a tuple with the following format (position,type,fillchar)\"\n\n\
-> position [required] -> float value for the position\n\n\
-> type [optional] -> left: 0 [default], right: 1, period: 2, comma: 3, center: 4\n\n\
60,7 → 60,7
\"name\" [required] -> name of the char style to create\n\n\
\"font\" [optional] -> name of the font to use\n\n\
fontsize [optional] -> font size to set (double)\n\n\
\"features\" [optional] -> nearer typographic details can be defined by a string that might contain the following phrases comma-seperated (without spaces!):\n\n\
\"features\" [optional] -> nearer typographic details can be defined by a string that might contain the following phrases comma-separated (without spaces!):\n\n\
-> inherit\n\n\
-> bold\n\n\
-> italic\n\n\
/trunk/Scribus/scribus/plugins/scriptplugin_py2x/cmdutil.cpp
30,7 → 30,7
return value2pts(Val, ScCore->primaryMainWindow()->doc->unitIndex());
}
 
/// Convert an X co-ordinate part in page units to a document co-ordinate
/// Convert an X coordinate part in page units to a document coordinate
/// in system units.
double pageUnitXToDocX(double pageUnitX)
{
43,9 → 43,9
return PointToValue(pageUnitX - ScCore->primaryMainWindow()->doc->currentPage()->xOffset());
}
 
/// Convert a Y co-ordinate part in page units to a document co-ordinate
/// in system units. The document co-ordinates have their origin somewere
/// up and left of the first page, where page co-ordinates have their
/// Convert a Y coordinate part in page units to a document coordinate
/// in system units. The document coordinates have their origin somewhere
/// up and left of the first page, where page coordinates have their
/// origin on the top left of the current page.
double pageUnitYToDocY(double pageUnitY)
{
233,7 → 233,7
return border;
}
 
// Parse each tuple decribing a border line and append it to the border.
// Parse each tuple describing a border line and append it to the border.
int nBorderLines = PyList_Size(borderLinesList);
for (int i = 0; i < nBorderLines; ++i)
{
/trunk/Scribus/scribus/plugins/scriptplugin_py2x/cmdutil.h
13,15 → 13,15
double PointToValue(double Val);
double ValueToPoint(double Val);
 
/*! \brief Convert an X co-ordinate part in page units to a document co-ordinate in system units.
/*! \brief Convert an X coordinate part in page units to a document coordinate in system units.
*/
double pageUnitXToDocX(double pageUnitX);
/// \brief Doc units -> page-relative units
double docUnitXToPageX(double pageUnitX);
 
/*! \brief Convert a Y co-ordinate part in page units to a document co-ordinate
in system units. The document co-ordinates have their origin somewere
up and left of the first page, where page co-ordinates have their
/*! \brief Convert a Y coordinate part in page units to a document coordinate
in system units. The document coordinates have their origin somewhere
up and left of the first page, where page coordinates have their
origin on the top left of the current page. */
double pageUnitYToDocY(double pageUnitY);
/// \brief Doc units -> page-relative units
/trunk/Scribus/scribus/plugins/scriptplugin_py2x/cmdvar.h
39,7 → 39,7
 
class ScripterCore;
 
// Globals for testing Qt properties and probably other more intresting future
// Globals for testing Qt properties and probably other more interesting future
// uses.
/** @brief A PyCObject containing a pointer to qApp */
extern PyObject* wrappedQApp;
66,7 → 66,7
/*! Exception raised when the user tries to create an object with the same name as one that already exists */
extern PyObject* NameExistsError;
 
/*! A helper variable for better string comparsions to reduce warnings:
/*! A helper variable for better string comparisons to reduce warnings:
"warning: comparison with string literal results in unspecified behaviour"
what is criticised by some linux distributors */
#ifndef EMPTY_STRING
/trunk/Scribus/scribus/plugins/scriptplugin_py2x/objimageexport.h
32,7 → 32,7
PyDoc_STRVAR(imgexp_dpi__doc__, "This value will be used for export as DPI. Read/write integer.");
PyDoc_STRVAR(imgexp_filename__doc__, "Filename of the image. With or without path. Read/write string.");
PyDoc_STRVAR(imgexp_quality__doc__, "Quality/compression: minimum 1 (poor), maximum 100 (qaulity). Read/write integer.");
PyDoc_STRVAR(imgexp_scale__doc__, "This is the scaling of the image. 100 = 100% etc. Read/write iteger.");
PyDoc_STRVAR(imgexp_scale__doc__, "This is the scaling of the image. 100 = 100% etc. Read/write integer.");
PyDoc_STRVAR(imgexp_transparentBkgnd__doc__, "Enable or disable transparent background.");
PyDoc_STRVAR(imgexp_type__doc__, "Bitmap type. See allTypes list for more info. Read/write string.");
 
/trunk/Scribus/scribus/plugins/scriptplugin_py2x/objpdffile.cpp
347,7 → 347,7
ScribusDoc* currentDoc = ScCore->primaryMainWindow()->doc;
PDFOptions& pdfOptions = currentDoc->pdfOptions();
 
// Defaut save into file
// Default save into file
QString tf = pdfOptions.fileName;
if (tf.isEmpty())
{
1049,13 → 1049,13
PyObject *tmp = PyList_GetItem(value, i);
if (!PyList_Check(tmp))
{
PyErr_SetString(PyExc_TypeError, "elemets of 'effval' must be list of five integers.");
PyErr_SetString(PyExc_TypeError, "elements of 'effval' must be list of five integers.");
return -1;
}
int j = PyList_Size(tmp);
if (j != 6)
{
PyErr_SetString(PyExc_TypeError, "elemets of 'effval' must have exactly six integers.");
PyErr_SetString(PyExc_TypeError, "elements of 'effval' must have exactly six integers.");
return -1;
}
for (--j; j > -1; --j)
1492,7 → 1492,7
PyObject *ti = PyList_GetItem(self->effval, i);
if (!ti)
continue;
// Do I Need to check if every PyInt_AsLong and PyList_GetItem funtion succeed???
// Do I Need to check if every PyInt_AsLong and PyList_GetItem function succeed???
t.pageEffectDuration = PyInt_AsLong(PyList_GetItem(ti, 0));
t.pageViewDuration = PyInt_AsLong(PyList_GetItem(ti, 1));
t.effectType = PyInt_AsLong(PyList_GetItem(ti, 2));
/trunk/Scribus/scribus/plugins/scriptplugin_py2x/objprinter.cpp
154,7 → 154,7
PyObject *tmp2 = PyString_FromString("File");
PyList_Append(self->allPrinters, tmp2);
Py_DECREF(tmp2);
// as defaut set to print into file
// as default set to print into file
PyObject *printer = nullptr;
printer = PyString_FromString("File");
if (printer) {
/trunk/Scribus/scribus/plugins/scriptplugin_py2x/samples/ExtractText.py
9,14 → 9,14
 
this version 2008.02.28
 
This program is free software; you can redistribute it and/or modify
it under the terms of the GPL, v2 (GNU General Public License as published by
the Free Software Foundation, version 2 of the License), or any later version.
See the Scribus Copyright page in the Help Browser for further informaton
about GPL, v2.
This program is free software; you can redistribute it and/or modify
it under the terms of the GPL, v2 (GNU General Public License as published by
the Free Software Foundation, version 2 of the License), or any later version.
See the Scribus Copyright page in the Help Browser for further information
about GPL, v2.
 
SYNOPSIS
 
SYNOPSIS
 
This script takes the current document and extracts all the text from text frames,
and also gets the pathnames to all images. This is then saved to a file named
by the user.
/trunk/Scribus/scribus/plugins/scriptplugin_py2x/samples/sample_db_usage.py
74,13 → 74,13
sys.exit(1)
 
cur = conn.cursor()
# get the list of the databases
# it's like 'select * from dba_tables' in Oracle
count = cur.execute('show tables')
# formating the output
result = str(count) + ' table(s) in the ' + dbname + ' database.\n\n'
for i in cur.fetchall():
result = result + i[0] + '\n'
# get the list of the databases
# it's like 'select * from dba_tables' in Oracle
count = cur.execute('show tables')
# formatting the output
result = str(count) + ' table(s) in the ' + dbname + ' database.\n\n'
for i in cur.fetchall():
result = result + i[0] + '\n'
 
# Scribus presentation part
scribus.newDoc(scribus.PAPER_A5, (10, 10, 20, 20), scribus.PORTRAIT, 1, scribus.UNIT_POINTS, scribus.NOFACINGPAGES, scribus.FIRSTPAGERIGHT)
/trunk/Scribus/scribus/plugins/scriptplugin_py2x/scriptercore.cpp
40,7 → 40,7
#include "prefscontext.h"
#include "prefstable.h"
#include "prefsmanager.h"
#include "scribusapp.h" // need it to acces ScQApp->pythonScript & ScQApp->pythonScriptArgs
#include "scribusapp.h" // need it to access ScQApp->pythonScript & ScQApp->pythonScriptArgs
 
ScripterCore::ScripterCore(QWidget* parent)
{
322,7 → 322,7
if (!ScCore->usingGUI())
cm += QString(" traceback.print_exc()\n");
// We re-raise the exception so the return value of PyRun_StringFlags reflects
// the fact that an exception has ocurred.
// the fact that an exception has occurred.
cm += QString(" raise\n");
// FIXME: if cmd contains chars outside 7bit ascii, might be problems
QByteArray cmd = cm.toUtf8();
338,7 → 338,7
if (errorMsgPyStr == nullptr)
{
// It's rather unlikely that this will ever be reached - to get here
// we'd have to fail to retrive the string we just created.
// we'd have to fail to retrieve the string we just created.
qDebug("Error retrieving error message content after script exception!");
qDebug("Exception was:");
PyErr_Print();
/trunk/Scribus/scribus/plugins/scriptplugin_py2x/scriptplugin.cpp
252,7 → 252,7
// Alas, there's a lot of wasteful string copying going on
// here.
QString translated = QObject::tr(docstringConstant, "scripter docstring");
// pv - hack for ugly formating in console removing
// pv - hack for ugly formatting in console removing
translated.replace("\n\n", "<P>");
translated.replace('\n', " ");
translated.replace("<P>", "\n\n");
/trunk/Scribus/scribus/plugins/scriptplugin_py2x/scripts/Align_image_in_frame.py
35,13 → 35,13
class TkImageAlignmentWizard(Frame):
""" GUI interface for aligning an image in a frame"""
def __init__(self, master=None):
""" Setup the dialog """
# refernce to the localization dictionary
self.key = 'English'
Frame.__init__(self, master)
self.grid()
def __init__(self, master=None):
""" Setup the dialog """
# reference to the localization dictionary
self.key = 'English'
Frame.__init__(self, master)
self.grid()
self.master.geometry('120x120-80+40')
self.master.title('Scribus Image Alignment Wizard')
#define widgets
/trunk/Scribus/scribus/plugins/scriptplugin_py2x/scripts/ColorChart.py
290,13 → 290,13
scribus.statusMessage("Drawing color fields...")
stepCompleted=0
#disable redrawing for better performance
scribus.setRedraw(False)
for color in colorList:
if (vSpaceUsedByField * (colorFieldCounter+1)) <= vSpaceAvailable:
# when there is enought space left draw a color field...
 
#calculate Position for new colorField
h=leftMargin
scribus.setRedraw(False)
for color in colorList:
if (vSpaceUsedByField * (colorFieldCounter+1)) <= vSpaceAvailable:
# when there is enough space left draw a color field...
 
#calculate Position for new colorField
h=leftMargin
v=topMargin + (vSpaceUsedByField * colorFieldCounter)+HEADERSIZE
#draw the colorField
drawColor(color, h, v, colorFieldWidth, COLOR_FIELD_HEIGHT)
315,13 → 315,13
colorFieldCounter = colorFieldCounter+1
 
#update progressbar
stepCompleted = stepCompleted+1
scribus.progressSet(stepCompleted)
 
#make shure pages are redrawn
scribus.setRedraw(True)
 
 
stepCompleted = stepCompleted+1
scribus.progressSet(stepCompleted)
 
#make sure pages are redrawn
scribus.setRedraw(True)
 
 
def main(argv):
"""just invokes createChart() and displays a message after the chart is finished."""
createChart()
/trunk/Scribus/scribus/plugins/scriptplugin_py2x/scripts/Ligatursatz.py
193,7 → 193,7
# points[1] = points[2] = points[-2] = points[-3] = 0
# But it is necessary to do at least this, just to avoid empty
# pieces. Otherwise, the pattern “von1” would lead for the
# word “von” to the result “[u"von", u""]” which is not intented.
# word “von” to the result “[u"von", u""]” which is not intended.
points[1] = 0
points[-2] = 0
# Examine the points to build the pieces list.
326,7 → 326,7
 
4.) Combine both, “wortliste” and “pre-1901” in one single file
> cat ../wortliste/wortliste ../wortliste/pre-1901 > full-list.utf8
The other available word lists currently do not provide informations
The other available word lists currently do not provide information
about morpheme boundaries, so it does not make sense to use them.
 
5.) Preprocess it
22235,7 → 22235,7
This is the content of the file “german.tr” of the Trennmuster
project (both capital letters and small letters), adding LATIN
CAPITAL LETTER SHARP S (ẞ) and LATIN SMALL LETTER LONG S (ſ). So it
contains all characters that occure in the original word list from
contains all characters that occurred in the original word list from
which the patterns are generated. (So it is likely
that is contains more characters than the patterns itself.)
 
22276,7 → 22276,7
all characters starting from this index position shifting to the
right. False means that at this index there is a ZWNJ and this
ZWNJ has to be removed. None means that nothing has to be done.
Of course, the list might be emtpy if my_word is empty. my_word
Of course, the list might be empty if my_word is empty. my_word
is supposed to contain a single word, and not various words with
whitespace. This function handles correctly the soft hyphen
U+00AD and the following characters with canonical decomposition:
22291,13 → 22291,13
# Handle normalization…
#
# The string is yet folded, so only small letters need to be
# handeled. We substitute the decomposed form by the composed
# handled. We substitute the decomposed form by the composed
# form (that is used in the pattern). To avoid a different
# character count, we introduce a soft hyphen. This is okay,
# because the soft hyphen will be ignored later anyway, and
# ZWNJ are always inserted before normal characters and never
# before soft hyphens. We handle only the minimum of
# canonical composition that really occures in our pattern.
# canonical composition that really occurs in our pattern.
#
# WARNING: This must be kept in synch with
# GermanLigatureSupport.get_word_characters().
22537,7 → 22537,7
(constructor argument) currently exists in the current document,
and it refers to a text frame.
Postcondition: Returns an integer that represents the length
of the text. The mesurement unit of the length is provided
of the text. The measurement unit of the length is provided
by Scribus. It is in Scribus 1.5.2 not “Unicode Scalar Values”,
but “UTF16 code units”.
"""
22623,7 → 22623,7
# However, we have made sure earlier that only Unicode
# Scalar Values inside BMP are in used_characters, so
# it is guaranteed that here the indexes are the same,
# wether it is UTF16 or UTF32. So we can savely use
# whether it is UTF16 or UTF32. So we can savely use
# these indexes to do our modifications in Scribus.
if instruction_list[j] == True:
# Insert here a ZWNJ.
22784,7 → 22784,7
# for the hole story (means, also for all linked text
# frames). Result: If the user has selected various linked
# text frames of the same story, than we do all the same
# work various times. That’s quite inefficent, but however
# work various times. That’s quite inefficient, but however
# I don’t know how to prevent this.
ligature_setting_for_story(my_textframe, my_provider)
# Clean the text selection for this Scribus object
/trunk/Scribus/scribus/plugins/scriptplugin_py2x/scripts/csv2color.py
8,14 → 8,14
csv2color.py allows a user to import colors from a given csv file into a scribus document.
The file must be a text file with comma separated values in the following format:
 
"colorname", c,m,y,k
"colorname", c,m,y,k
 
There must be a document opend in scribus where the colors can be defined in.
If the csv contains one or more color names that already exist in the document, the colors will be imported with a `*` as prefix.
 
This script is especially helpful if you want to use CMYK color representations of color systems like HKS, Pantone or RAL in Scribus. Lots of such CMYK translation tables can be found on the Web.
One can easily copy such a table into a text file, save it in the obove described format and import it into a scribus document.
 
There must be a document opend in scribus where the colors can be defined in.
If the csv contanins one or more color names that already exist in the document, the colors will be imported with a `*` as prefix.
 
This script is especially helpful if you want to use CMYK color representations of color systems like HKS, Pantone or RAL in Scribus. Lots of such CMYK translation tables can be found on the Web.
One can easily copy such a table into a text file, save it in the obove described format and import it into a scribus document.
 
Use color2csv to export the colors from a scribus document into a csv file.
 
############################
/trunk/Scribus/scribus/plugins/scriptplugin_py2x/scripts/importcsv2table.py
79,13 → 79,13
 
#########################
# YOUR IMPORTS GO HERE #
#########################
import csv
 
#get information about the area where the bale should be drawed
def getPosition():
if scribus.selectionCount() == 1:
areaname = scribus.getSelectedObject()
#########################
import csv
 
#get information about the area where the bale should be drawn
def getPosition():
if scribus.selectionCount() == 1:
areaname = scribus.getSelectedObject()
position= scribus.getPosition(areaname)
vpos = position[1]
hpos = position[0]
/trunk/Scribus/scribus/plugins/short-words/configuration.cpp
4,11 → 4,11
a copyright and/or license notice that predates the release of Scribus 1.3.2
for which a new license (GPL+exception) is in place.
*/
/* This is the Scribus Short Words configuratin implementation.
/* This is the Scribus Short Words configuration implementation.
There will be interface for the future Scribus central plugin
config center. maybe :)
 
This code is based on the Scribus-Vlna plug in rewritten for
This code is based on the Scribus-Vlna plugin rewritten for
international use.
 
2004 Petr Vanek <petr@yarpen.cz>
/trunk/Scribus/scribus/plugins/short-words/configuration.h
13,11 → 13,11
class QStringList;
class PrefsContext;
 
/*! \brief This is the Scribus Short Words configuratin specification.
Methods of this class read config files and PrefsManager context informations.
/*! \brief This is the Scribus Short Words configuration specification.
Methods of this class read config files and PrefsManager context information.
Preferences GUI is in SWPrefsGui.
 
This code is based on the Scribus-Vlna plug in rewritten for
This code is based on the Scribus-Vlna plugin rewritten for
international use.
 
\author Petr Vanek <petr@yarpen.cz> with contributors.
/trunk/Scribus/scribus/plugins/short-words/parse.cpp
6,7 → 6,7
*/
/* This is the Scribus Short Words plugin main mechanism.
 
This code is based on the Scribus-Vlna plug in rewritten for
This code is based on the Scribus-Vlna plugin rewritten for
international use.
 
2004 Petr Vanek <petr@yarpen.cz>
/trunk/Scribus/scribus/plugins/short-words/parse.h
15,8 → 15,8
 
/*! \brief This is the Scribus Short Words plugin main mechanism.
 
It walks trough the user specified objects and apply the spaces.
This code is based on the Scribus-Vlna plug in rewritten for
It walks through the user specified objects and applies the spaces.
This code is based on the Scribus-Vlna plugin rewritten for
international use.
 
\author Petr Vanek <petr@yarpen.cz> with contributors.
42,7 → 42,7
description in the code of this method.
\param aFrame pointer to the existing text frame */
void parseItem(PageItem *aFrame);
/*! \brief selcted frames on the page */
/*! \brief selected frames on the page */
void parseSelection(ScribusDoc* doc);
/*! \brief one page - using actual page */
void parsePage(ScribusDoc* doc);
/trunk/Scribus/scribus/plugins/short-words/shortwords.cpp
6,7 → 6,7
*/
/* This is the Scribus Short Words plugin interface implementation.
 
This code is based on the Scribus-Vlna plug in rewritten for
This code is based on the Scribus-Vlna plugin rewritten for
international use.
 
2004 Petr Vanek <petr@yarpen.cz>
/trunk/Scribus/scribus/plugins/short-words/shortwords.h
14,7 → 14,7
 
/*! \brief This is the Scribus Short Words plugin interface specification.
 
This code is based on the Scribus-Vlna plug in rewritten for
This code is based on the Scribus-Vlna plugin rewritten for
international use.
 
\author Petr Vanek <petr@yarpen.cz>
/trunk/Scribus/scribus/plugins/short-words/swdialog.cpp
6,7 → 6,7
*/
/* This is the Scribus Short Words GUI class implementation.
 
This code is based on the Scribus-Vlna plug in rewritten for
This code is based on the Scribus-Vlna plugin rewritten for
international use.
 
2004 Petr Vanek <petr@yarpen.cz>
/trunk/Scribus/scribus/plugins/short-words/swdialog.h
6,7 → 6,7
*/
/* This is the Scribus Short Words GUI class specification.
 
This code is based on the Scribus-Vlna plug in rewritten for
This code is based on the Scribus-Vlna plugin rewritten for
international use.
 
2004 Petr Vanek <petr@yarpen.cz>
/trunk/Scribus/scribus/plugins/short-words/version.h
7,7 → 7,7
/* \brief This is the Scribus Short Words various constants and preprocessor
definitions. There should be all SPACEs defined (unbreak, em, en etc.)
 
This code is based on the Scribus-Vlna plug in rewritten for
This code is based on the Scribus-Vlna plugin rewritten for
international use.
 
2004 Petr Vanek <petr@yarpen.cz>
/trunk/Scribus/scribus/plugins/tools/hunspellcheck/hunspellpluginimpl.cpp
68,7 → 68,7
bool dictPathFound = LanguageManager::instance()->findSpellingDictionaries(dictionaryPaths);
if (!dictPathFound)
{
qDebug()<<"No preinstalled dictonary paths found";
qDebug()<<"No preinstalled dictionary paths found";
return false;
}
dictionaryMap.clear();
/trunk/Scribus/scribus/prefsmanager.h
105,7 → 105,7
 
/*! \brief Save the preferences.
\param fname optional filename with preferences. If is not given,
the defualt is used. */
the default is used. */
void savePrefs();
void savePrefsXML();
 
/trunk/Scribus/scribus/prefsstructs.h
303,7 → 303,7
struct FontPrefs
{
SCFonts AvailFonts; //! Fonts that Scribus has available to it, or the current document has available to use
bool askBeforeSubstitute; //! Request that the user confirms a font substituion or not
bool askBeforeSubstitute; //! Request that the user confirms a font substitution or not
QMap<QString,QString> GFontSub;
};
 
/trunk/Scribus/scribus/qtiocompressor.cpp
190,13 → 190,13
/*! \class QtIOCompressor
\brief The QtIOCompressor class is a QIODevice that compresses data streams.
 
A QtIOCompressor object is constructed with a pointer to an
underlying QIODevice. Data written to the QtIOCompressor object
will be compressed before it is written to the underlying
QIODevice. Similary, if you read from the QtIOCompressor object,
the data will be read from the underlying device and then
decompressed.
 
A QtIOCompressor object is constructed with a pointer to an
underlying QIODevice. Data written to the QtIOCompressor object
will be compressed before it is written to the underlying
QIODevice. Similarly, if you read from the QtIOCompressor object,
the data will be read from the underlying device and then
decompressed.
 
QtIOCompressor is a sequential device, which means that it does
not support seeks or random access. Internally, QtIOCompressor
uses the zlib library to compress and uncompress data.
249,13 → 249,13
 
The allowed value range for \a compressionLevel is 0 to 9, where 0 means no compression
and 9 means maximum compression. The default value is 6.
 
\a bufferSize specifies the size of the internal buffer used when reading from and writing to the
underlying device. The default value is 65KB. Using a larger value allows for faster compression and
deompression at the expense of memory usage.
*/
QtIOCompressor::QtIOCompressor(QIODevice *device, int compressionLevel, int bufferSize)
:d_ptr(new QtIOCompressorPrivate(this, device, compressionLevel, bufferSize))
 
\a bufferSize specifies the size of the internal buffer used when reading from and writing to the
underlying device. The default value is 65KB. Using a larger value allows for faster compression and
decompression at the expense of memory usage.
*/
QtIOCompressor::QtIOCompressor(QIODevice *device, int compressionLevel, int bufferSize)
:d_ptr(new QtIOCompressorPrivate(this, device, compressionLevel, bufferSize))
{}
 
/*!
311,14 → 311,14
{
return true;
}
 
/*!
Opens the QtIOCompressor in \a mode. Only ReadOnly and WriteOnly is supported.
This function will return false if you try to open in other modes.
 
If the underlying device is not opened, this function will open it in a suitable mode. If this happens
the device will also be closed when close() is called.
 
/*!
Opens the QtIOCompressor in \a mode. Only ReadOnly and WriteOnly is supported.
This functon will return false if you try to open in other modes.
 
If the underlying device is not opened, this function will open it in a suitable mode. If this happens
the device will also be closed when close() is called.
 
If the underlying device is already opened, its openmode must be compatible with \a mode.
 
Returns true on success, false on error.
548,13 → 548,13
case Z_NEED_DICT:
case Z_DATA_ERROR:
case Z_MEM_ERROR:
d->state = QtIOCompressorPrivate::Error;
d->setZlibError(QT_TRANSLATE_NOOP("QtIOCompressor", "Internal zlib error when decompressing: "), status);
return -1;
case Z_BUF_ERROR: // No more input and zlib can not privide more output - Not an error, we can try to read again when we have more input.
return 0;
break;
}
d->state = QtIOCompressorPrivate::Error;
d->setZlibError(QT_TRANSLATE_NOOP("QtIOCompressor", "Internal zlib error when decompressing: "), status);
return -1;
case Z_BUF_ERROR: // No more input and zlib can not provide more output - Not an error, we can try to read again when we have more input.
return 0;
break;
}
// Loop util data buffer is full or we reach the end of the input stream.
} while (d->zlibStream.avail_out != 0 && status != Z_STREAM_END);
 
/trunk/Scribus/scribus/sampleitem.h
39,11 → 39,11
/*! \brief Use lorem ipsum generator as text source.
\param para count of the LI paragraphs */
void setLoremIpsum(int para);
/*! \brief Set backgroud color of the pixmap.
/*! \brief Set background color of the pixmap.
\param c a QColor */
void setBgColor(const QColor& c);
void setBgShade(int c);
/*! \brief Set color management for backgroud color of the pixmap.
/*! \brief Set color management for background color of the pixmap.
\param enable if color management should be enabled */
void setBgColorMgmt(bool enable);
/*! \brief Set Text color of the pixmap.
/trunk/Scribus/scribus/scclocale.cpp
179,7 → 179,7
{
if (nullptr == that()->cLocale)
{
// a sade workaround
// a sad workaround
double result(0.0);
std::streamoff bytesRead;
std::istringstream sstream(str);
/trunk/Scribus/scribus/sccolorengine.h
120,7 → 120,7
/** \brief Check if a color is inside document output color space gamut. */
static bool isOutOfGamut(const ScColor& color, const ScribusDoc* doc);
 
/** \brief Applys Gray-Component-Removal to an ScColor */
/** \brief Apply Gray-Component-Removal to an ScColor */
static void applyGCR(ScColor& color, const ScribusDoc* doc);
};
 
/trunk/Scribus/scribus/scfonts.cpp
1208,7 → 1208,7
/* Add an extra path to our font search path,
* allowing a user to have extra fonts installed
* only for this user. Can also be used also as an emergency
* fallback if no suitable fonts are found elsewere */
* fallback if no suitable fonts are found elsewhere */
void SCFonts::addUserPath(const QString& pf)
{
PrefsContext *pc = PrefsManager::instance().prefsFile->getContext("Fonts");
/trunk/Scribus/scribus/scgtplugin.h
49,7 → 49,7
/**
@brief Run the plugin and import from the file <code>filename</code>
 
This function is ment to be overriden by all file format plugins.
This function is meant to be overridden by all file format plugins.
Once the file decoding and text and style has been sorted out use the
function forward() to pass the text and it's style forward to a text frame
or to another plugin.
63,7 → 63,7
@brief Run the plugin and do the magic with the <code>text</code> and
@brief <code>style</code>.
This function is ment to be overriden by all text and style handler plugins.
This function is meant to be overridden by all text and style handler plugins.
@param text text to work with
*/
virtual void run(const QString&text /*, insert style stuff here */) {};
/trunk/Scribus/scribus/scimagecachemanager.cpp
132,7 → 132,7
 
\section ic_dirstructure Directory Structure
 
Each cache file is uniquely indentified by a hexadecimal MD5 hash. The first
Each cache file is uniquely identified by a hexadecimal MD5 hash. The first
two hex digits represent two levels of subdirectories and the remainder forms
the start of the file's basename, for example:
 
/trunk/Scribus/scribus/scimagecachemanager.h
80,7 → 80,7
/**
* @brief Set cache image file compression level
* @param level Image compression level. -1 is the default compression level
* for PNG images. 0 is no compression, 1 is fastest comression and
* for PNG images. 0 is no compression, 1 is fastest compression and
* 9 is best compression.
* @return \c true if the compression level could be set, \c false otherwise
*/
/trunk/Scribus/scribus/scplugin.h
42,7 → 42,7
* and maintain as little state as possible. Most functionality should be
* implemented in a private subclass that is not exposed in the header of the
* scplugin subclass defined by the plugin. That helps keep the plugin's
* implementation separate from its inteface to Scribus.
* implementation separate from its interface to Scribus.
*
* Note that the two subclases ScActionPlugin and ScPersistentPlugin, defined
* below, create two quite different kinds of plugins. One is for import/export
402,7 → 402,7
* A caller is not required to do this, but with the current (August
* 2005) core code it's the only way to operate safely. This is
* likely to change in future and you should avoid relying on it if
* at all posssible.
* at all possible.
*
* If this method is used, the plugin must not be unloaded until all
* DeferredTask instances have been deleted.
419,7 → 419,7
virtual DeferredTask* runAsync(QIODevice* target);
 
// Compat kludge ... we store a QString result from any successful
// run(...) call in m_runResult and let callers retrive it here.
// run(...) call in m_runResult and let callers retrieve it here.
// DO NOT USE THIS INTERFACE FOR NEW PLUG-INS; you should
// dynamic_cast<> to the plugin type then call a plug-in specific
// method instead.
/trunk/Scribus/scribus/scprintengine_gdi.cpp
357,7 → 357,7
else
success = true;
}
// Return if color managament could not be setup
// Return if color management could not be setup
if (!success)
{
EndPage(printerDC);
719,7 → 719,7
PRINTER_INFO_2W* pInfos = (PRINTER_INFO_2W*) malloc(size);
if (pInfos)
{
// Get printer informations
// Get printer information
done = GetPrinterW(prnHandle, 2, (LPBYTE) pInfos, size, &size);
if (done)
{
/trunk/Scribus/scribus/scribus.cpp
2543,7 → 2543,7
//if we are switching windows #4357
//nodePalette->setDoc(doc, view);
slotChangeUnit(doc->unitIndex(), false);
/* FIXME: check if this is really superflous now
/* FIXME: check if this is really superfluous now
if (doc->appMode == modeEditClip)
{
doc->appMode = modeNormal;
3390,7 → 3390,7
setScriptRunning(true);
bool loadSuccess = fileLoader->loadFile(doc);
//Do the font replacement check from here, when we have a GUI. TODO do this also somehow without the GUI
//This also gives the user the opportunity to cancel the load when finding theres a replacement required.
//This also gives the user the opportunity to cancel the load when finding there's a replacement required.
if (loadSuccess && ScCore->usingGUI())
loadSuccess = fileLoader->postLoad(doc);
if (!loadSuccess)
3881,7 → 3881,7
currItem->Pfile = fileName;
doc->loadPict(fileName, currItem, false, true);
// Call to showScaleAndOffset() is now very likely unnecessary
// due to mecanisms used to update properties in PP in 1.5.x+
// due to mechanisms used to update properties in PP in 1.5.x+
//propertiesPalette->imagePal->showScaleAndOffset(currItem->imageXScale(), currItem->imageYScale(), currItem->imageXOffset(), currItem->imageYOffset());
qApp->processEvents(QEventLoop::ExcludeUserInputEvents);
view->DrawNew();
7109,7 → 7109,7
if (doc->pdfOptions().useDocBleeds)
doc->pdfOptions().bleeds = *doc->bleeds();
 
// If necssary, generate thumbnails in one go : if color management is enabled
// If necessary, generate thumbnails in one go : if color management is enabled
// we gain lots of time by avoiding multiple color management settings change
// and hence multiple reloading of images
bool cmsCorr = false;
9366,7 → 9366,7
if (!HaveDoc)
return;
if (doc->m_docNotesStylesList.count() == 1)
{ //fast insert note with the only default notes style avaiable
{ //fast insert note with the only default notes style available
PageItem* currItem = doc->m_Selection->itemAt(0);
Q_ASSERT(currItem->isTextFrame() && !currItem->isNoteFrame());
UndoTransaction trans;
/trunk/Scribus/scribus/scribus.h
553,7 → 553,7
void slotItemTransform();
//! \brief manages paints
void manageColorsAndFills();
//! \brief allow SE to get the SM for edit stlyes
//! \brief allow SE to get the SM for edit styles
StyleManager *styleMgr() const {return m_styleManager;};
//! \brief drawnew, call palettes to update for new page layout
void updateGUIAfterPagesChanged();
/trunk/Scribus/scribus/scribus_pch.h
64,7 → 64,7
 
#include <qcoreapplication.h>
#include <qlist.h>
#include <qvariant.h> // All moc genereated code has this include
#include <qvariant.h> // All moc generated code has this include
#include <qobject.h>
#include <qregexp.h>
#include <qstring.h>
/trunk/Scribus/scribus/scribusapp.h
59,8 → 59,8
the whole string is returned. For all the other locales starting
with "en", no locale is returned.
(Inspired from Klocale.cpp)
\param lang QString a two letter string describing the lang environement
\retval QStringList A string describing the language environement
\param lang QString a two letter string describing the lang environment
\retval QStringList A string describing the language environment
*/
QStringList getLang(QString m_lang);
/*!
68,7 → 68,7
\author Alessandro Rimoldi
\date Mon Feb 9 14:07:46 CET 2004
\brief Loads the translations for Scribus and for the Plugins
\param langs QString a two letter string describing the lang environement
\param langs QString a two letter string describing the lang environment
*/
void installTranslators(const QStringList & langs);
 
/trunk/Scribus/scribus/scribusdoc.cpp
451,7 → 451,7
Layers.addLayer( tr("Background") );
// FIXME: Check PDF version input
//TODO: Check if this is needed now we ue appPrefsData --> docPrefsData
//TODO: Check if this is needed now we use appPrefsData --> docPrefsData
docPatterns.clear();
docGradients.clear();
 
565,7 → 565,7
delete pa.items.takeFirst();
}
}
//deleting resources alocated for marks and notes
//deleting resources allocated for marks and notes
while (! m_docNotesList.isEmpty())
delete m_docNotesList.takeFirst();
while (!m_docMarksList.isEmpty())
5469,7 → 5469,7
newItem->setLineColor(m_docPrefsData.itemToolPrefs.textLineColor);
newItem->setLineShade(m_docPrefsData.itemToolPrefs.textLineColorShade);
// 13792 : Commented out because this trigger the first line of a text frame having
// default character style explictly assigned, which we don't want
// default character style explicitly assigned, which we don't want
/*defaultParagraphStyle.setParent(CommonStrings::DefaultParagraphStyle);
defaultParagraphStyle.charStyle().setParent(CommonStrings::DefaultCharacterStyle);
newItem->itemText.setDefaultStyle(defaultParagraphStyle);*/
6188,7 → 6188,7
if (pageNumber >= 0 && pageNumber < Pages->size())
getBleeds(Pages->at(pageNumber), bleedData);
else
qCritical() << "Attempting to get bleeds for non-existant page";
qCritical() << "Attempting to get bleeds for non-existent page";
}
 
void ScribusDoc::getBleeds(const ScPage* page, MarginStruct& bleedData)
6856,7 → 6856,7
int key=getSectionKeyForPageIndex(pageIndex);
if (key==-1)
return retVal;
//If a section is inactive, theres no page numbers printed
//If a section is inactive, there's no page numbers printed
if (!m_docPrefsData.docSectionMap[key].active)
return "";
uint sectionIndexOffset;
6875,7 → 6875,7
if (key == -1)
return retVal;
 
//If a section is inactive, theres no page numbers printed
//If a section is inactive, there's no page numbers printed
if (!m_docPrefsData.docSectionMap[key].active)
return retVal;
retVal = m_docPrefsData.docSectionMap[key].pageNumberFillChar;
6891,7 → 6891,7
if (key == -1)
return retVal;
 
//If a section is inactive, theres no page numbers printed
//If a section is inactive, there's no page numbers printed
if (!m_docPrefsData.docSectionMap[key].active)
return retVal;
retVal = qMin(m_docPrefsData.docSectionMap[key].pageNumberWidth, 20); // added the qmin as a sanity check -> fixes bug #9721
8720,7 → 8720,7
dontResize = true;
if (appMode == modeEditTable && !table->selectedRows().isEmpty())
{
// Distribute each contigous range of selected rows.
// Distribute each contiguous range of selected rows.
QList<int> selectedRows = table->selectedRows().values();
std::sort(selectedRows.begin(), selectedRows.end());
int startRow = selectedRows.first();
8763,7 → 8763,7
dontResize = true;
if (appMode == modeEditTable && !table->selectedColumns().isEmpty())
{
// Distribute each contigous range of selected columns.
// Distribute each contiguous range of selected columns.
QList<int> selectedColumns = table->selectedColumns().values();
std::sort(selectedColumns.begin(), selectedColumns.end());
int startColumn = selectedColumns.first();
10986,7 → 10986,7
is->set("CHANGE_SHAPE_TYPE");
is->set("OLD_FRAME_TYPE", item->FrameType);
is->set("NEW_FRAME_TYPE", frameType);
// HACK: this is propably Evil Code (TM). I have to find better way...
// HACK: this is probably Evil Code (TM). I have to find better way...
FPointArray newShape;
int ix = 0;
for (int i = 0; i < count/2; ++i)
14404,7 → 14404,7
if (embedded->isGroup())
embedded->asGroupFrame()->adjustXYPosition();
}
// JG : Break flipped group positionning when resizing on canvas
// JG : Break flipped group positioning when resizing on canvas
/*if (currItem->imageFlippedH())
{
if (oldX - currItem->xPos() == 0)
/trunk/Scribus/scribus/scribusdoc.h
872,7 → 872,7
/**
* @brief Rebuild item lists taking into account layer order.
* Utility function used in various places, basically handles keeping items numbered in the way
* they are layered. When layer is a property and not a fuction of storage, this should be removed.
* they are layered. When layer is a property and not a function of storage, this should be removed.
* @sa updateFrameItems();
*/
void rebuildItemLists();
1264,8 → 1264,8
//! \brief Set rotation mode
void setRotationMode(int val);
 
//! \brief Fonctions which avoid doc updater and update manager to send too much
// unncessary signals when doing updates on multiple items
//! \brief Functions which avoid doc updater and update manager to send too much
// unnecessary signals when doing updates on multiple items
void beginUpdate();
void endUpdate();
 
1695,7 → 1695,7
/**
* Distributes rows in a table evenly.
*
* If in table edit mode and there is a cell selection, each contigous range of selected rows
* If in table edit mode and there is a cell selection, each contiguous range of selected rows
* is distributed. If there is no cell selection, all rows in the table are distributed.
*
* If there is no table selected, then this slot does nothing.
1705,7 → 1705,7
/**
* Distributes columns in a table evenly.
*
* If in table edit mode and there is a cell selection, each contigous range of selected columns
* If in table edit mode and there is a cell selection, each contiguous range of selected columns
* is distributed. If there is no cell selection, all columns in the table are distributed.
*
* If there is no table selected, then this slot does nothing.
1788,7 → 1788,7
bool eraseMark(Mark* mrk, bool fromText=false, PageItem* item = nullptr, bool force = false); //force is used only for deleting non-unique marks by MarksManager
void setUndoDelMark(Mark* mrk);
//invalidate all text frames where given mark will found
//useful spacially for varaible text marks after changing its text definition
//useful spacially for variable text marks after changing its text definition
//if forceUpdate then found master frames are relayouted
bool invalidateVariableTextFrames(Mark* mrk, bool forceUpdate = false); //returns if any text was changed
 
1811,7 → 1811,7
bool updateNotesNums(NotesStyle* nStyle);
//set new text styles for notes marks
void updateNotesFramesStyles(NotesStyle* nStyle);
//check conflicts beetween notes styles
//check conflicts between notes styles
bool validateNSet(const NotesStyle& NS, QString newName = "");
//update layout remove empty notesframes
bool notesFramesUpdate();
1878,7 → 1878,7
//auto-numerations
public:
QMap<QString, NumStruct*> numerations;
QStringList orgNumNames; //orgNumerations keeps original settings read from paragraph styles for reset settings overrided localy
QStringList orgNumNames; //orgNumerations keeps original settings read from paragraph styles for reset settings overridden localy
void setupNumerations(); //read styles for used auto-numerations, initialize numCounters
QString getNumberStr(const QString& numName, int level, bool reset, const ParagraphStyle &style);
void setNumerationCounter(const QString& numName, int level, int number);
/trunk/Scribus/scribus/scribusview.cpp
3175,7 → 3175,7
}
 
// We usually don't need any of the undo actions created by TextToPathPainter. If we did take them into account,
// the created items woud reappear when redoing an undone TextToPath action
// the created items would reappear when redoing an undone TextToPath action
int textLen = currItem->itemText.length();
if (textLen > 1)
undoManager->setUndoEnabled(false);
/trunk/Scribus/scribus/sctextstruct.h
24,7 → 24,7
class Mark;
class ScribusDoc;
 
/* Strucure for Pageitem Text */
/* Structure for Pageitem Text */
 
 
/*
63,7 → 63,7
 
/**
* simple class to abstract from inline pageitems. You will need a ITextContext
* to get meaningfull data about the InlineFrame, for other purposes it is opaque
* to get meaningful data about the InlineFrame, for other purposes it is opaque
*/
class SCRIBUS_API InlineFrame
{
160,7 → 160,7
 
 
/** @brief First Line Offset Policy
* Set wether the first line offset is based on max glyph height
* Set whether the first line offset is based on max glyph height
* or some of predefined height.
* I put a prefix because it could easily conflict
*/
/trunk/Scribus/scribus/styleitem.h
29,7 → 29,7
* @brief Represents a style type that can be added to the Style Manager
* @brief palette.
*
* This class is ment to be used as a parent class for any style types
* This class is meant to be used as a parent class for any style types
* that are wanted to be configured using the Style Manager palette.
* @author Riku Leino <riku@scribus.info>
* @date November 2005
191,7 → 191,7
*/
 
private:
/* hide these two, StyleItem is not ment to be copied */
/* hide these two, StyleItem is not meant to be copied */
StyleItem(const StyleItem&);
void operator=(const StyleItem&);
 
/trunk/Scribus/scribus/tests/CMakeLists.txt
23,14 → 23,14
COMPILE_FLAGS -DCOMPILE_SCRIBUS_MAIN_APP
)
 
 
# Regular unit tests below.
#
# These tests are built as standalone executables and are run using "make test"
#
 
set(TESTS_LIBRARIES ${QT_QTTEST_LIBRARY} ${QT_LIBRARIES})
 
# Regular unit tests below.
#
# These tests are built as standalone executables and runned using "make test"
#
 
set(TESTS_LIBRARIES ${QT_QTTEST_LIBRARY} ${QT_LIBRARIES})
 
# Unit tests for CellArea
set(CELLAREATESTS_SOURCES cellareatests.cpp ../cellarea.cpp)
add_executable(cellareatests ${CELLAREATESTS_SOURCES})
/trunk/Scribus/scribus/tests/scripts/test_tables.py
8,16 → 8,16
For general Scribus (>=1.3.2) copyright and licensing information please refer
to the COPYING file provided with the program. Following this notice may exist
a copyright and/or license notice that predates the release of Scribus 1.3.2
for which a new license (GPL+exception) is in place.
 
To add a new test, simply add a new test method named 'test_mytest' to the
TableTests class, and the test will be runned automatically.
 
Use check() to check a condition and fail(msg) to manually fail a test. The
tests are runned in a "fail fast" fashion; on failure, the test method will
stop executing and testing move on to the next test method.
"""
 
for which a new license (GPL+exception) is in place.
 
To add a new test, simply add a new test method named 'test_mytest' to the
TableTests class, and the test will be run automatically.
 
Use check() to check a condition and fail(msg) to manually fail a test. The
tests are run in a "fail fast" fashion; on failure, the test method will
stop executing and testing move on to the next test method.
"""
 
from scribus import *
from traceback import print_exc
from sys import stdout
/trunk/Scribus/scribus/text/design.txt
2,7 → 2,7
 
0) Storage. Scribus uses Unicode and defines it's own style classes.
 
1) Itemizing. This involves breaking the text into charater runs which have single language/script, the same font and style.
1) Itemizing. This involves breaking the text into character runs which have single language/script, the same font and style.
 
2) Shaping. This phase uses font information to associate glyphs to characters.
The relationship between characters and glyphs is 1:1 only in the simplest cases. The result is a list of grapheme clusters, where each cluster consists of one and more glyphs which represent one or more characters.
/trunk/Scribus/scribus/text/specialchars.cpp
246,9 → 246,9
(0x0100 <= ch && ch <= 0x017F) || // Letters in Latin Extended-A
(0x0180 <= ch && ch <= 0x024F) || // Letters in Latin Extended-B
(0x0250 <= ch && ch <= 0x02AF) || // Letters in IPA Extensions
(0x1D00 <= ch && ch <= 0x1D25) || // Letters in Phonetic Extentions
(0x1D6B <= ch && ch <= 0x1D70) || // Letters in Phonetic Extentions
(0x1D80 <= ch && ch <= 0x1D9A) || // Letters in Phonetic Extentions Supplement
(0x1D00 <= ch && ch <= 0x1D25) || // Letters in Phonetic Extensions
(0x1D6B <= ch && ch <= 0x1D70) || // Letters in Phonetic Extensions
(0x1D80 <= ch && ch <= 0x1D9A) || // Letters in Phonetic Extensions Supplement
(0x1E02 <= ch && ch <= 0x1EF3) || // Letters in Latin Extended Additional
(0x2C60 <= ch && ch <= 0x2C7F) || // Letters in Latin Extended-C
(0xA722 <= ch && ch <= 0xA787) || // Letters in Latin Extended-D
/trunk/Scribus/scribus/text/storytext.cpp
1221,7 → 1221,7
if (textItem->mark)
this->d->marksCount++;
 
// Set marksCountChanged unconditionnaly to force text relayout
// Set marksCountChanged unconditionally to force text relayout
d->marksCountChanged = true;
}
 
/trunk/Scribus/scribus/text/textshaper.cpp
294,7 → 294,7
QVector<int32_t> justificationTracking;
 
// Insert implicit spaces in justification between characters
// in scripts that do not use spaces to seperate words
// in scripts that do not use spaces to separate words
for (const TextRun& run : qAsConst(scriptRuns))
{
switch (run.script) {
/trunk/Scribus/scribus/ui/charselect.h
20,7 → 20,7
/*! \brief Character Palette for direct glyphs inserting.
The "classical" one is opened as CharSelectEnhanced instance.
Both CharSelect/CharSelectEnhanced palettes are split due:
1) initial and usage performace. The CharSelectEnhanced is too
1) initial and usage performance. The CharSelectEnhanced is too
slow to load on startup/doc opening etc. The memory footprint
is much smaller too.
2) It was one dialog before split. To show/hide "enhanced" part
52,7 → 52,7
void changeEvent(QEvent *e) override;
 
signals:
/*! \brief A signall emittedthis palette tries to insert glyphs.
/*! \brief A signal emitted this palette tries to insert glyphs.
It does not have sense in standard "palette" mode, but it's used
in StoryEditor workaround. */
void insertSpecialChar();
/trunk/Scribus/scribus/ui/charselectenhanced.h
12,13 → 12,13
#include "chartablemodel.h"
#include "ui_charselectenhanced.h"
 
 
/*! \brief Character Palette for batch glyphs inserting.
Enhanced instance is created/destroyed on every call from CharSelect
to improve internal performace.
*/
class SCRIBUS_API CharSelectEnhanced : public ScrPaletteBase, public Ui::CharSelectEnhanced
{
 
/*! \brief Character Palette for batch glyphs inserting.
Enhanced instance is created/destroyed on every call from CharSelect
to improve internal performance.
*/
class SCRIBUS_API CharSelectEnhanced : public ScrPaletteBase, public Ui::CharSelectEnhanced
{
Q_OBJECT
 
public:
/trunk/Scribus/scribus/ui/checkDocument.cpp
397,7 → 397,7
default:
break;
};
// additional informations
// additional information
const ScLayer* layer = m_Doc->Layers.layerByID(pageItem->m_layerID);
if (layer)
{
/trunk/Scribus/scribus/ui/checkDocument.h
112,15 → 112,15
QVBoxLayout* checkDocumentLayout { nullptr };
QHBoxLayout* layout1 { nullptr };
QHBoxLayout* layout2 { nullptr };
//! \brief Mappping Page Item - item nr.
//! \brief Mapping Page Item - item nr.
QMap<QTreeWidgetItem*, QPointer<PageItem> > itemMap;
//! \brief Mappping Page - page nr.
//! \brief Mapping Page - page nr.
QMap<QTreeWidgetItem*, ScPage*> pageMap;
//! \brief Mappping Master Page - MP nr.
//! \brief Mapping Master Page - MP nr.
QMap<QTreeWidgetItem*, ScPage*> masterPageMap;
//! \brief Mappping MP Item - MP item nr.
//! \brief Mapping MP Item - MP item nr.
QMap<QTreeWidgetItem*, QPointer<PageItem> > masterPageItemMap;
//! \brief Mappping Page Item - cursor position in item
//! \brief Mapping Page Item - cursor position in item
QMap<QTreeWidgetItem*, int> posMap;
 
//! \brief a reference to the current document
/trunk/Scribus/scribus/ui/cpalette.cpp
99,7 → 99,7
hatchLineColor->setPixmapType(ColorCombo::fancyPixmaps);
hatchBackground->setPixmapType(ColorCombo::fancyPixmaps);
 
/* Setting a delegate to dispaly only icons for the patterns */
/* Setting a delegate to display only icons for the patterns */
/* ScListWidgetDelegate* delegateF = new ScListWidgetDelegate(patternBox, patternBox);
delegateF->setIconOnly(true);
patternBox->setItemDelegate(delegateF);
/trunk/Scribus/scribus/ui/helpbrowser.cpp
62,7 → 62,7
#include "iconmanager.h"
#include "util.h"
 
/*! \brief XML parsef for documantation history.
/*! \brief XML parsed for documentation history.
This is small helper class which reads saved bookmarks configuration
from ~/.scribus/doc/history.xml file.
The reference to historyBrowser is a reference to the dialog.
105,7 → 105,7
}
};
 
/*! \brief XML parsef for documantation bookmarks.
/*! \brief XML parsed for documentation bookmarks.
This is small helper class which reads saved bookmarks configuration
from ~/.scribus/doc/bookmarks.xml file.
The reference to QListView *view is a reference to the list view with bookmarks
/trunk/Scribus/scribus/ui/loremipsum.h
69,7 → 69,7
 
/*! \brief This module provides simple interface to the various Lorem Ipsum variants.
Scribus LI are stored in the set of XML files.
The file has followind structure:
The file has the following structure:
\<?xml version="1.0" encoding="utf8"?\>
\<lorem\>
\<name\>name to display\</name\>
/trunk/Scribus/scribus/ui/mark2item.cpp
12,7 → 12,7
{
PageItem* item = scmw->doc->Items->at(i);
if (item->isAutoNoteFrame())
continue; //omit notes frames automaticaly created and removed
continue; //omit notes frames automatically created and removed
itemsList.append(item->itemName());
}
ItemList->addItems(itemsList);
/trunk/Scribus/scribus/ui/marksmanager.cpp
194,7 → 194,7
updateListView();
}
 
//update lables for "lost" marks (marks not in any text)
//update labels for "lost" marks (marks not in any text)
QList<Mark*> notUsed;
for (int a=0; a < m_Doc->marksList().count(); ++a)
{
/trunk/Scribus/scribus/ui/picsearchoptions.h
59,7 → 59,7
/**
* \brief Toggle a search button in the table between "Search" and "Cancel Search",
* fixing signal connections as well.
* \param toCancel true in the "cancelation" state/process
* \param toCancel true in the "cancellation" state/process
* \param searcher a reference to the searcher object
*/
void setSearchButton(bool toCancel, const FileSearch* searcher);
/trunk/Scribus/scribus/ui/prefs_documentsetup.cpp
129,13 → 129,13
pageWidthSpinBox->setToolTip( "<qt>" + tr( "Width of document pages, editable if you have chosen a custom page size" ) + "</qt>" );
pageHeightSpinBox->setToolTip( "<qt>" + tr( "Height of document pages, editable if you have chosen a custom page size" ) + "</qt>" );
pageSizeComboBox->setToolTip( "<qt>" + tr( "Default page size, either a standard size or a custom size. More page sizes can be made visible by activating them in Preferences." ) + "</qt>" );
pageSizeLinkToolButton->setToolTip( "<qt>" + tr( "Enable or disable more page sizes by jumping to Page Size preferences" ) + "</qt>" );
pageOrientationComboBox->setToolTip( "<qt>" + tr( "Default orientation of document pages" ) + "</qt>" );
pageUnitsComboBox->setToolTip( "<qt>" + tr( "Default unit of measurement for document editing" ) + "</qt>" );
autosaveCheckBox->setToolTip( "<qt>" + tr( "When enabled, Scribus saves backup copys of your file each time the time period elapses" ) + "</qt>" );
autosaveIntervalSpinBox->setToolTip( "<qt>" + tr( "Time period between saving automatically" ) + "</qt>" );
undoLengthSpinBox->setToolTip( "<qt>" + tr("Set the length of the action history in steps. If set to 0 infinite amount of actions will be stored.") + "</qt>");
applySizesToAllPagesCheckBox->setToolTip( "<qt>" + tr( "Apply the page size changes to all existing pages in the document" ) + "</qt>" );
pageSizeLinkToolButton->setToolTip( "<qt>" + tr( "Enable or disable more page sizes by jumping to Page Size preferences" ) + "</qt>" );
pageOrientationComboBox->setToolTip( "<qt>" + tr( "Default orientation of document pages" ) + "</qt>" );
pageUnitsComboBox->setToolTip( "<qt>" + tr( "Default unit of measurement for document editing" ) + "</qt>" );
autosaveCheckBox->setToolTip( "<qt>" + tr( "When enabled, Scribus saves backup copies of your file each time the time period elapses" ) + "</qt>" );
autosaveIntervalSpinBox->setToolTip( "<qt>" + tr( "Time period between saving automatically" ) + "</qt>" );
undoLengthSpinBox->setToolTip( "<qt>" + tr("Set the length of the action history in steps. If set to 0 infinite amount of actions will be stored.") + "</qt>");
applySizesToAllPagesCheckBox->setToolTip( "<qt>" + tr( "Apply the page size changes to all existing pages in the document" ) + "</qt>" );
applyMarginsToAllPagesCheckBox->setToolTip( "<qt>" + tr( "Apply the page size changes to all existing master pages in the document" ) + "</qt>" );
autosaveCountSpinBox->setToolTip("<qt>" + tr("Keep this many files during the editing session. Backup files will be removed when you close the document.") + "</qt>");
}
/trunk/Scribus/scribus/ui/prefs_fonts.cpp
135,7 → 135,7
DON'T REMOVE THIS COMMENTS, PLEASE! (Petr)
It's just a performance vs. functionality test.
availFonts->clear();
// FIXME: This is main preformance issue. It's about 90% of all preference reads! - PV
// FIXME: This is main performance issue. It's about 90% of all preference reads! - PV
availFonts->getFonts(HomeP); */
/* Are you wondering why this condition? See the comment at
line #102 (or somewhere near) as reference. Hint: PathList
/trunk/Scribus/scribus/ui/prefs_userinterface.cpp
58,13 → 58,13
Prefs_UserInterface::~Prefs_UserInterface() = default;
 
void Prefs_UserInterface::languageChange()
{
themeComboBox->setToolTip( "<qt>" + tr( "Choose the default window decoration and looks. Scribus inherits any available KDE or Qt themes, if Qt is configured to search KDE plugins." ) + "</qt>");
iconSetComboBox->setToolTip( "<qt>" + tr( "Choose the default icon set" ) + "</qt>");
useSmallWidgetsCheckBox->setToolTip( "<qt>" + tr( "Palette windows will use smaller (space savy) widgets. Requires application restart." ) + "</qt>");
recentDocumentsSpinBox->setToolTip( "<qt>" + tr( "Number of recently edited documents to show in the File menu" ) + "</qt>");
languageComboBox->setToolTip( "<qt>" + tr( "Select your default language for Scribus to run with. Leave this blank to choose based on environment variables. You can still override this by passing a command line option when starting Scribus." )+"</qt>");
numberFormatComboBox->setToolTip( "<qt>" + tr( "Use either the system or selected language related definition for number formats for decimals for numbers in the interface" ) + "</qt>");
{
themeComboBox->setToolTip( "<qt>" + tr( "Choose the default window decoration and looks. Scribus inherits any available KDE or Qt themes, if Qt is configured to search KDE plugins." ) + "</qt>");
iconSetComboBox->setToolTip( "<qt>" + tr( "Choose the default icon set" ) + "</qt>");
useSmallWidgetsCheckBox->setToolTip( "<qt>" + tr( "Palette windows will use smaller (space savvy) widgets. Requires application restart." ) + "</qt>");
recentDocumentsSpinBox->setToolTip( "<qt>" + tr( "Number of recently edited documents to show in the File menu" ) + "</qt>");
languageComboBox->setToolTip( "<qt>" + tr( "Select your default language for Scribus to run with. Leave this blank to choose based on environment variables. You can still override this by passing a command line option when starting Scribus." )+"</qt>");
numberFormatComboBox->setToolTip( "<qt>" + tr( "Use either the system or selected language related definition for number formats for decimals for numbers in the interface" ) + "</qt>");
fontSizeMenuSpinBox->setToolTip( "<qt>" + tr( "Default font size for the menus and windows" ) + "</qt>");
fontSizePaletteSpinBox->setToolTip( "<qt>" + tr( "Default font size for the tool windows" ) + "</qt>");
resizeMoveDelaySpinBox->setToolTip( "<qt>" + tr( "Time before resize or move starts allows for a slight delay between when you click and the operation happens to avoid unintended moves. This can be helpful when dealing with mouse sensitivity settings or accessibility issues related to ergonomic mice, touch pads or moveability of the wrists and hands." ) + "</qt>");
/trunk/Scribus/scribus/ui/propertiespalette.h
64,7 → 64,7
bool userActionOn(); // not yet implemented!!! This is needed badly.
// When user releases the mouse button or arrow key, changes must be checked
// and if in ScribusView a groupTransaction has been started it must be also
// commmited
// committed
 
PropertiesPalette_Line* linePal {nullptr};
PropertiesPalette_Shadow* shadowPal {nullptr};
/trunk/Scribus/scribus/ui/propertiespalette_text.h
46,7 → 46,7
bool userActionOn(); // not yet implemented!!! This is needed badly.
// When user releases the mouse button or arrow key, changes must be checked
// and if in ScribusView a groupTransaction has been started it must be also
// commmited
// committed
protected:
bool m_haveDoc {false};
bool m_haveItem {false};
/trunk/Scribus/scribus/ui/propertiespalette_xyz.h
36,7 → 36,7
bool userActionOn(); // not yet implemented!!! This is needed badly.
// When user releases the mouse button or arrow key, changes must be checked
// and if in ScribusView a groupTransaction has been started it must be also
// commmited
// committed
 
void setLineMode(int lineMode);
 
/trunk/Scribus/scribus/ui/resourcemanager.cpp
1050,7 → 1050,7
}
if (d.filetype=="plain")
{
//do nothing as the file is alread in place from dl mgr
//do nothing as the file is already in place from dl mgr
}
}
break;
1090,7 → 1090,7
}
if (d.filetype=="plain")
{
//do nothing as the file is alread in place from dl mgr
//do nothing as the file is already in place from dl mgr
}
}
}
1140,7 → 1140,7
}
if (d.filetype=="plain")
{
//do nothing as the file is alread in place from dl mgr
//do nothing as the file is already in place from dl mgr
}
}
break;
/trunk/Scribus/scribus/ui/scfilewidget.cpp
67,13 → 67,13
setMinimumSize(QSize(480, 310));
setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Preferred);
}
 
void ScFileWidget::forceDoubleClickActivation(bool force)
{
// Hack to make the previews in our file dialogs useable again,
// needed e.g on OpenSuse KDE. Otherwise file would open on first
// click, leaving user no time to see preview.
if (m_forceDoubleClickActivation == force)
 
void ScFileWidget::forceDoubleClickActivation(bool force)
{
// Hack to make the previews in our file dialogs usable again,
// needed e.g on OpenSuse KDE. Otherwise file would open on first
// click, leaving user no time to see preview.
if (m_forceDoubleClickActivation == force)
return;
 
if (force)
/trunk/Scribus/scribus/ui/scfilewidget.h
14,13 → 14,13
/*! \brief Simple wrapper simulating the QFileDialog as a common widget.
Usage is simple - everything is like in QFileDialog except it is not
a dialog, it's a widget. It can be used for extension features etc.
\note Original QFileDialog OK/Cancel buttons are hidden. You must
write your own dialog accept/reject handling.
There is one good idea - it's quite good to handle original dialog
accepted() signal on your own to prevent ugly widget hidding when
user e.g. doubleclicks the "open" file (in the parent (new) dialog):
connect(fileWidget, SIGNAL(accepted()), this, SLOT(accept()));
\author Petr Vanek <petr@scribus.info>
\note Original QFileDialog OK/Cancel buttons are hidden. You must
write your own dialog accept/reject handling.
There is one good idea - it's quite good to handle original dialog
accepted() signal on your own to prevent ugly widget hiding when
user e.g. doubleclicks the "open" file (in the parent (new) dialog):
connect(fileWidget, SIGNAL(accepted()), this, SLOT(accept()));
\author Petr Vanek <petr@scribus.info>
*/
class SCRIBUS_API ScFileWidget : public QFileDialog
{
/trunk/Scribus/scribus/ui/smstyleimport.h
43,7 → 43,7
QTreeWidgetItem * lstyleItem;
 
/*! \brief Following constants are used as flags for searching.
Soemthing like: give me all character style related items from
Something like: give me all character style related items from
the list. See commonStyles() for more info.
*/
static const int cType = QTreeWidgetItem::UserType;
/trunk/Scribus/scribus/ui/storyeditor.h
488,7 → 488,7
void Do_del();
void Do_insSp();
/*! \brief Insert a Lorem Ipsum (from dialog) into
current position inthe SE.
current position in the SE.
*/
void insertSampleText();
void Do_fontPrev();
/trunk/Scribus/scribus/ui/textpalette.h
42,7 → 42,7
bool userActionOn(); // not yet implemented!!! This is needed badly.
// When user releases the mouse button or arrow key, changes must be checked
// and if in ScribusView a groupTransaction has been started it must be also
// commmited
// committed
 
PropertiesPalette_Text* textPal { nullptr };
 
/trunk/Scribus/scribus/ui/unicodesearch.h
48,7 → 48,7
//! Data model
UnicodeSearchModel * m_model;
 
//! \brief Overriden hide event. Just emit the setVisibleState(false) here.
//! \brief Overridden hide event. Just emit the setVisibleState(false) here.
void hideEvent(QHideEvent * e);
 
private slots:
131,7 → 131,7
private:
/*! \brief UnicodeSearch reference.
The dialog is created in "this" constructor. Showing and hiding
is handled by toggled() signal catched in self_toggled() */
is handled by toggled() signal caught in self_toggled() */
UnicodeSearch* m_searchDialog;
 
/* \brief Hold cache timer.
/trunk/Scribus/scribus/upgradechecker.cpp
158,7 → 158,7
uint verMinor = verAStripped.section('.', 1, 1).toInt();
uint verRevsion1 = verAStripped.section('.', 2, 2).toInt();
uint verRevsion2 = verAStripped.section('.', 3, 3).toInt();
//If we found a release whe a user is running an old CVS version
//If we found a release when a user is running an old CVS version
if (verMajor == major && verMinor == minor && verRevsion1 == m_patchLevel && verRevsion2 == m_versionSuffix && m_isSVN && !verIsCVS && !m_updates.contains(verA))
newVersion = true;
else if (!(verMajor == major && verMinor == minor && verRevsion1 == m_patchLevel && verRevsion2 == m_versionSuffix))
/trunk/Scribus/scribus/util.h
199,7 → 199,7
/*!
*\brief
* check if name exists in list
* if exist then seprator and numbers are pre/append to name while it will be unique
* if exist then separator and numbers are pre/append to name while it will be unique
*/
void SCRIBUS_API getUniqueName(QString &name, const QStringList& list, const QString& separator = QString(), bool prepend = false);
 
/trunk/Scribus/scribus/util_file.h
47,7 → 47,7
*
* @param source the source file
* @param target the target filter
* @return true on success, false on failre.
* @return true on success, false on failure.
**/
bool SCRIBUS_API copyFileToFilter(const QString& source, ScStreamFilter& target);
/**
54,7 → 54,7
* @brief Copy a source file to a data stream
* @param source the source file
* @param target the target stream
* @return true on success, false on failre.
* @return true on success, false on failure.
**/
bool SCRIBUS_API copyFileToStream(const QString& source, QDataStream& target);
/**
65,7 → 65,7
*
* @param source the source file
* @param target the target file
* @return true on success, false on failre.
* @return true on success, false on failure.
**/
bool SCRIBUS_API moveFile(const QString& source, const QString& target);
/**
/trunk/Scribus/scribus/util_ghostscript.cpp
228,7 → 228,7
return (proc.exitCode() == 0);
}
 
// Return the GhostScript version string, or QString() if it couldn't be retrived.
// Return the GhostScript version string, or QString() if it couldn't be retrieved.
QString getGSVersion()
{
QStringList args;
/trunk/Scribus/scribus/util_ghostscript.h
6,7 → 6,7
*/
 
/*!
* @brief GS utility fucntions
* @brief GS utility functions
* Moved functions written or modified by various people over the time from util.cpp
*
* @author Craig Bradney
/trunk/Scribus/scribus/util_math.cpp
324,7 → 324,7
/*bool oldResult = QRegion(rect).subtracted(shape).isEmpty();*/
 
// Code adapted from Qt RectInRegion (cf. qregion.cpp) to detect
// if a specific rect is stricly contained in a specific region
// if a specific rect is strictly contained in a specific region
const QRect *pbox, *pboxEnd;
bool partIn(false), partOut(false);