/trunk/Scribus/ChangeLogCVS |
---|
1,5 → 1,18 |
Changes since Version 1.1.7 |
13.07.2004 |
* bug #859: New File with Custom Page Size and mm, page size gets smaller when switching portrait and landscape |
* feature #856: Translation update for German |
* feature #857: Polish Translation Update |
11.07.2004 |
* bug #852: import SVG, export PDF, import SVG again => crash |
* feature #844: selecting importet eps text very slow and not nice |
08.07.2004 |
* bug #849: Scribus mailing list seems seems to be down |
* bug #851: SVG import does not support paths properly |
04.07.2004 |
* bug #844: selecting importet eps text very slow and not nice |
* feature #578: one-click/keyboard for toggling off and on all dialogboxes+guides etc |
/trunk/Scribus/scribus/mpalette.h |
---|
88,8 → 88,33 |
void updateCList(); |
void updateCmsList(); |
void ShowCMS(); |
void fillLangCombo(QMap<QString,QString> Sprachen); |
QButtonGroup* buttonGroup5; |
void fillLangCombo(QMap<QString,QString> langMap); |
Autoforms* SCustom; |
LabelButton* colgapLabel; |
FontCombo* Fonts; |
StyleSelect* SeStyle; |
AlignSelect* GroupAlign; |
Spalette *Spal; |
LinkButton* Kette; |
LinkButton* Kette2; |
LineCombo* LStyle; |
ShadeButton *PM1; |
ShadeButton *PM2; |
PageItem *CurItem; |
bool HaveDoc; |
bool HaveItem; |
ScribusDoc *doc; |
double Umrech; |
bool LMode; |
double RoVal; |
QButtonGroup* proppalButtonGrp; |
QButtonGroup* RotationGroup; |
QButtonGroup* ShapeGroup; |
QPushButton* TabsButton; |
QToolButton* SShape; |
QToolButton* SText; |
QToolButton* SImage; |
96,9 → 121,15 |
QToolButton* SLine; |
QToolButton* SGeom; |
QToolButton* SColor; |
QToolButton* Zup; |
QToolButton* ZDown; |
QToolButton* ZTop; |
QToolButton* ZBottom; |
QWidgetStack* TabStack; |
QWidgetStack* TabStack2; |
QWidgetStack* TabStack3; |
QWidget* page; |
QWidget* page_2; |
QWidget* page_2a; |
108,140 → 139,127 |
QWidget* page_5; |
QWidget* page_5a; |
QWidget* page_5b; |
Cpalette *Cpal; |
NameWidget* NameEdit; |
QGroupBox* NameGroup; |
NameWidget* NameEdit; |
QGroupBox* GeoGroup; |
QLabel* Text1; |
QLabel* Text2; |
QLabel* Text1a; |
QLabel* Text2a; |
QGroupBox* LayerGroup; |
QGroupBox* Distance; |
QGroupBox* Distance2; |
QGroupBox* GroupBoxCM; |
QGroupBox* TLines; |
QGroupBox* GroupBox3; |
QGroupBox* GroupBox3a; |
QCheckBox* Textflow; |
QCheckBox* Textflow2; |
QCheckBox* Aspect; |
QCheckBox* showcurveCheckBox; |
QCheckBox* TopLine; |
QCheckBox* LeftLine; |
QCheckBox* RightLine; |
QCheckBox* BottomLine; |
QComboBox* langCombo; |
QComboBox* InputP; |
QComboBox* MonitorI; |
QComboBox* LineMode; |
QComboBox* TxStroke; |
QComboBox* LJoinStyle; |
QComboBox* LEndStyle; |
QComboBox* TxFill; |
QLabel* xposLabel; |
QLabel* widthLabel; |
QLabel* yposLabel; |
QLabel* heightLabel; |
QLabel* rotationLabel; |
QLabel* basepointLabel; |
QLabel* LevelTxt; |
QLabel* SRect; |
QLabel* rndcornersLabel; |
QLabel* startoffsetLabel; |
QLabel* distfromcurveLabel; |
QLabel* topLabel; |
QLabel* columnsLabel; |
QLabel* bottomLabel; |
QLabel* leftLabel; |
QLabel* rightLabel; |
QLabel* kerningLabel; |
QLabel* linespacingLabel; |
QLabel* fontsizeLabel; |
QLabel* yscaleLabel; |
QLabel* xscaleLabel; |
QLabel* xposImgLabel; |
QLabel* yposImgLabel; |
QLabel* linewidthLabel; |
QLabel* endingsLabel; |
QLabel* linetypeLabel; |
QLabel* StrokeIcon; |
QLabel* ShadeTxt2; |
QLabel* ShadeTxt1; |
QLabel* FillIcon; |
QLabel* styleLabel; |
QLabel* langLabel; |
QLabel* LineModeT; |
QLabel* TextCms1; |
QLabel* TextCms2; |
QLabel* edgesLabel; |
QLabel* ScaleTxt; |
QListBox* StyledLine; |
MSpinBox* Width; |
MSpinBox* Xpos; |
MSpinBox* Ypos; |
MSpinBox* Height; |
QGroupBox* LayerGroup; |
QToolButton* Zup; |
QToolButton* ZDown; |
QToolButton* ZTop; |
QToolButton* ZBottom; |
QButtonGroup* RotationGroup; |
QRadioButton* TopLeft; |
QFrame* Line1; |
QRadioButton* TopRight; |
QFrame* Line2; |
QRadioButton* Center; |
QFrame* Line4; |
QRadioButton* BottomLeft; |
QFrame* Line5; |
QRadioButton* BottomRight; |
QLabel* Text3; |
MSpinBox* Rot; |
QLabel* Text3r; |
QLabel* LevelTxt; |
QToolButton* FlipH; |
QToolButton* FlipV; |
QToolButton* Locked; |
QToolButton* NoPrint; |
QToolButton* NoResize; |
QButtonGroup* ShapeGroup; |
QLabel* SRect; |
Autoforms* SCustom; |
QLabel* Text4; |
MSpinBox* RoundRect; |
QCheckBox* Textflow; |
QCheckBox* Textflow2; |
QToolButton* EditShape; |
QGroupBox* Distance; |
QGroupBox* Distance2; |
QLabel* TextLabel3; |
QLabel* TextLabel2; |
MSpinBox* Dist; |
MSpinBox* LineW; |
QLabel* Text14; |
QLabel* Text14a; |
LabelButton* Text14b; |
QLabel* Text15; |
QLabel* Text16; |
QSpinBox* DCol; |
MSpinBox* DGap; |
MSpinBox* DTop; |
MSpinBox* DBottom; |
MSpinBox* DLeft; |
QPushButton* TabsButton; |
QLabel* Text17; |
MSpinBox* DRight; |
QCheckBox* NormText2; |
FontCombo* Fonts; |
MSpinBox* Dist; |
MSpinBox* LineW; |
MSpinBox* Size; |
QToolButton* Revert; |
StyleSelect* SeStyle; |
AlignSelect* GroupAlign; |
QGroupBox* GroupBox3; |
MSpinBox* LineSp; |
MSpinBox* Extra; |
QLabel* Text5; |
QLabel* Text6; |
QGroupBox* GroupBox3a; |
Spalette *Spal; |
QLabel* Text20; |
QRadioButton* FreeScale; |
QLabel* Text13; |
MSpinBox* LYpos; |
QLabel* Text12; |
QLabel* Text11; |
QLabel* Text11a; |
MSpinBox* LXpos; |
LinkButton* Kette; |
LinkButton* Kette2; |
MSpinBox* ScaleY; |
MSpinBox* ScaleX; |
QFrame* Line5_2; |
QRadioButton* FrameScale; |
QFrame* Frame4; |
QCheckBox* Aspect; |
QLabel* TextCms1; |
QLabel* TextCms2; |
QComboBox* InputP; |
QComboBox* MonitorI; |
QLabel* LineModeT; |
QComboBox* LineMode; |
QLabel* Text9; |
MSpinBox* LSize; |
QLabel* TextLabel1; |
QComboBox* LJoinStyle; |
QLabel* Text10; |
QComboBox* LEndStyle; |
QLabel* Text8; |
LineCombo* LStyle; |
QListBox* StyledLine; |
QLabel* ScaleTxt; |
QSpinBox* ChScale; |
QLabel* StrokeIcon; |
QComboBox* TxStroke; |
QLabel* ShadeTxt2; |
QLabel* ShadeTxt1; |
ShadeButton *PM1; |
QLabel* FillIcon; |
QComboBox* TxFill; |
ShadeButton *PM2; |
QLabel* StilT; |
QLabel* SprachT; |
QComboBox* LangCombo; |
QGroupBox* GroupBoxCM; |
QGroupBox* TLines; |
QCheckBox* TopLine; |
QCheckBox* LeftLine; |
QCheckBox* RightLine; |
QCheckBox* BottomLine; |
PageItem *CurItem; |
bool HaveDoc; |
bool HaveItem; |
ScribusDoc *doc; |
double Umrech; |
bool LMode; |
double RoVal; |
QSpinBox* DCol; |
QRadioButton* TopLeft; |
QRadioButton* TopRight; |
QRadioButton* Center; |
QRadioButton* BottomLeft; |
QRadioButton* BottomRight; |
QRadioButton* FreeScale; |
QRadioButton* FrameScale; |
QFrame* Line1; |
QFrame* Line2; |
QFrame* Line4; |
QFrame* Line5; |
QFrame* Line5_2; |
QFrame* Frame4; |
QToolButton* FlipH; |
QToolButton* FlipV; |
QToolButton* Locked; |
QToolButton* NoPrint; |
QToolButton* NoResize; |
QToolButton* Revert; |
QToolButton* EditShape; |
public slots: |
void SetDoc(ScribusDoc *d); |
void UnsetDoc(); |
344,7 → 362,7 |
protected: |
QVBoxLayout* MpalLayout; |
QGridLayout* buttonGroup5Layout; |
QGridLayout* proppalButtonGrpLayout; |
QVBoxLayout* pageLayout; |
QVBoxLayout* pageLayout_2; |
QVBoxLayout* pageLayout_2a; |
/trunk/Scribus/scribus/mpalette.cpp |
---|
68,9 → 68,10 |
NameWidget::NameWidget(QWidget* parent) : QLineEdit(parent) |
{} |
void NameWidget::focusOutEvent(QFocusEvent *) |
void NameWidget::focusOutEvent(QFocusEvent *e) |
{ |
emit Leaved(); |
QLineEdit::focusOutEvent(e); |
} |
Mpalette::Mpalette( QWidget* parent, preV *Prefs) : QDialog( parent, "Mdouble", false, 0) |
88,48 → 89,55 |
QFont f(font()); |
f.setPointSize(f.pointSize()-1); |
setFont(f); |
buttonGroup5 = new QButtonGroup( this, "buttonGroup5" ); |
buttonGroup5->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)5, (QSizePolicy::SizeType)5, 0, 0, buttonGroup5->sizePolicy().hasHeightForWidth() ) ); |
buttonGroup5->setFrameShape( QButtonGroup::NoFrame ); |
buttonGroup5->setExclusive( true ); |
buttonGroup5->setColumnLayout(0, Qt::Vertical ); |
buttonGroup5->setTitle( QString::null ); |
buttonGroup5->layout()->setSpacing( 0 ); |
buttonGroup5->layout()->setMargin( 0 ); |
buttonGroup5Layout = new QGridLayout( buttonGroup5->layout() ); |
buttonGroup5Layout->setAlignment( Qt::AlignTop ); |
SGeom = new QToolButton( buttonGroup5, "toolButton24" ); |
proppalButtonGrp = new QButtonGroup( QString::null, this, "proppalButtonGrp" ); |
proppalButtonGrp->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)5, (QSizePolicy::SizeType)5, 0, 0, proppalButtonGrp->sizePolicy().hasHeightForWidth() ) ); |
proppalButtonGrp->setFrameShape( QButtonGroup::NoFrame ); |
proppalButtonGrp->setExclusive( true ); |
proppalButtonGrp->setColumnLayout(0, Qt::Vertical ); |
proppalButtonGrp->layout()->setSpacing( 0 ); |
proppalButtonGrp->layout()->setMargin( 0 ); |
proppalButtonGrpLayout = new QGridLayout( proppalButtonGrp->layout() ); |
proppalButtonGrpLayout->setAlignment( Qt::AlignTop ); |
SGeom = new QToolButton( proppalButtonGrp, "toolButton24" ); |
SGeom->setToggleButton( true ); |
SGeom->setOn( true ); |
SGeom->setFont(f); |
SGeom->setText( tr( "X, Y, Z" ) ); |
buttonGroup5Layout->addWidget( SGeom, 0, 0 ); |
SShape = new QToolButton( buttonGroup5, "toolButton25" ); |
proppalButtonGrpLayout->addWidget( SGeom, 0, 0 ); |
SShape = new QToolButton( proppalButtonGrp, "toolButton25" ); |
SShape->setToggleButton( true ); |
SShape->setFont(f); |
SShape->setText( tr( "Shape" ) ); |
buttonGroup5Layout->addWidget( SShape, 0, 1 ); |
SText = new QToolButton( buttonGroup5, "toolButton26" ); |
proppalButtonGrpLayout->addWidget( SShape, 0, 1 ); |
SText = new QToolButton( proppalButtonGrp, "toolButton26" ); |
SText->setToggleButton( true ); |
SText->setFont(f); |
SText->setText( tr( "Text" ) ); |
buttonGroup5Layout->addWidget( SText, 1, 0 ); |
SImage = new QToolButton( buttonGroup5, "toolButton27" ); |
proppalButtonGrpLayout->addWidget( SText, 1, 0 ); |
SImage = new QToolButton( proppalButtonGrp, "toolButton27" ); |
SImage->setToggleButton( true ); |
SImage->setFont(f); |
SImage->setText( tr( "Image" ) ); |
buttonGroup5Layout->addWidget( SImage, 1, 1 ); |
SLine = new QToolButton( buttonGroup5, "toolButton28" ); |
proppalButtonGrpLayout->addWidget( SImage, 1, 1 ); |
SLine = new QToolButton( proppalButtonGrp, "toolButton28" ); |
SLine->setToggleButton( true ); |
SLine->setFont(f); |
SLine->setText( tr( "Line" ) ); |
buttonGroup5Layout->addWidget( SLine, 2, 0 ); |
SColor = new QToolButton( buttonGroup5, "toolButton29" ); |
proppalButtonGrpLayout->addWidget( SLine, 2, 0 ); |
SColor = new QToolButton( proppalButtonGrp, "toolButton29" ); |
SColor->setToggleButton( true ); |
SColor->setFont(f); |
SColor->setText( tr( "Colors" ) ); |
buttonGroup5Layout->addWidget( SColor, 2, 1 ); |
MpalLayout->addWidget( buttonGroup5 ); |
proppalButtonGrpLayout->addWidget( SColor, 2, 1 ); |
MpalLayout->addWidget( proppalButtonGrp ); |
TabStack = new QWidgetStack( this, "TabStack" ); |
TabStack->setFrameShape( QWidgetStack::NoFrame ); |
136,8 → 144,7 |
page = new QWidget( TabStack, "page" ); |
pageLayout = new QVBoxLayout( page, 0, 5, "pageLayout"); |
NameGroup = new QGroupBox( page, "NameGroup" ); |
NameGroup->setTitle( tr( "Name" ) ); |
NameGroup = new QGroupBox( tr( "Name" ), page, "NameGroup" ); |
NameGroup->setColumnLayout(0, Qt::Vertical ); |
NameGroup->layout()->setSpacing( 4 ); |
NameGroup->layout()->setMargin( 5 ); |
147,25 → 154,23 |
NameGroupLayout->addWidget( NameEdit ); |
pageLayout->addWidget( NameGroup ); |
GeoGroup = new QGroupBox( page, "GeoGroup" ); |
GeoGroup->setTitle( tr( "Geometry" ) ); |
GeoGroup = new QGroupBox( tr( "Geometry" ), page, "GeoGroup" ); |
GeoGroup->setColumnLayout(0, Qt::Vertical ); |
GeoGroup->layout()->setSpacing( 4 ); |
GeoGroup->layout()->setMargin( 5 ); |
GeoGroupLayout = new QGridLayout( GeoGroup->layout() ); |
GeoGroupLayout->setAlignment( Qt::AlignTop ); |
Text1 = new QLabel( GeoGroup, "Text1" ); |
Text1->setText( tr( "X-Pos:" ) ); |
GeoGroupLayout->addWidget( Text1, 0, 0 ); |
Text1a = new QLabel( GeoGroup, "Text1a" ); |
Text1a->setText( tr( "Y-Pos:" ) ); |
GeoGroupLayout->addWidget( Text1a, 1, 0 ); |
Text2 = new QLabel( GeoGroup, "Text2" ); |
Text2->setText( tr( "Width:" ) ); |
GeoGroupLayout->addWidget( Text2, 2, 0 ); |
Text2a = new QLabel( GeoGroup, "Text2a" ); |
Text2a->setText( tr( "Height:" ) ); |
GeoGroupLayout->addWidget( Text2a, 3, 0 ); |
xposLabel = new QLabel( tr( "X-Pos:" ), GeoGroup, "xposLabel" ); |
GeoGroupLayout->addWidget( xposLabel, 0, 0 ); |
yposLabel = new QLabel( tr( "Y-Pos:"), GeoGroup, "yposLabel" ); |
GeoGroupLayout->addWidget( yposLabel, 1, 0 ); |
widthLabel = new QLabel( tr( "Width:" ), GeoGroup, "widthLabel" ); |
GeoGroupLayout->addWidget( widthLabel, 2, 0 ); |
heightLabel = new QLabel( tr( "Height:" ), GeoGroup, "heightLabel" ); |
GeoGroupLayout->addWidget( heightLabel, 3, 0 ); |
Xpos = new MSpinBox( GeoGroup, 2 ); |
Xpos->setSuffix( tr( " pt" ) ); |
Xpos->setMaxValue( 3000 ); |
182,9 → 187,8 |
Height = new MSpinBox( GeoGroup, 2 ); |
Height->setSuffix( tr( " pt" ) ); |
GeoGroupLayout->addWidget( Height, 3, 1 ); |
Text3 = new QLabel( GeoGroup, "Text3" ); |
Text3->setText( tr( "Rotation:" ) ); |
GeoGroupLayout->addWidget( Text3, 4, 0 ); |
rotationLabel = new QLabel( tr( "Rotation:" ), GeoGroup, "rotationLabel" ); |
GeoGroupLayout->addWidget( rotationLabel, 4, 0 ); |
Kette2 = new LinkButton( GeoGroup ); |
Kette2->setToggleButton( true ); |
Kette2->setAutoRaise( true ); |
194,11 → 198,9 |
Rot->setSuffix( QString::fromUtf8(" °")); |
Rot->setWrapping( true ); |
GeoGroupLayout->addWidget( Rot, 4, 1 ); |
Text3r = new QLabel( GeoGroup, "Text3r" ); |
Text3r->setText( tr( "Basepoint:" ) ); |
GeoGroupLayout->addWidget( Text3r, 5, 0 ); |
RotationGroup = new QButtonGroup( GeoGroup, "RotationGroup" ); |
RotationGroup->setTitle( "" ); |
basepointLabel = new QLabel( tr( "Basepoint:" ), GeoGroup, "basepointLabel" ); |
GeoGroupLayout->addWidget( basepointLabel, 5, 0 ); |
RotationGroup = new QButtonGroup( "", GeoGroup, "RotationGroup" ); |
RotationGroup->setFrameShape( QButtonGroup::NoFrame ); |
RotationGroup->setColumnLayout(0, Qt::Vertical ); |
RotationGroup->layout()->setSpacing( 0 ); |
263,8 → 265,7 |
QSpacerItem* spacer1 = new QSpacerItem( 0, 0, QSizePolicy::Expanding, QSizePolicy::Minimum ); |
layout60->addItem( spacer1 ); |
LayerGroup = new QGroupBox( page, "LayerGroup" ); |
LayerGroup->setTitle( tr( "Level" ) ); |
LayerGroup = new QGroupBox( tr( "Level" ), page, "LayerGroup" ); |
LayerGroup->setColumnLayout(0, Qt::Vertical ); |
LayerGroup->layout()->setSpacing( 4 ); |
LayerGroup->layout()->setMargin( 5 ); |
286,9 → 287,8 |
ZBottom->setMaximumSize( QSize( 22, 22 ) ); |
ZBottom->setPixmap(loadIcon("bottom.png")); |
LayerGroupLayout->addWidget( ZBottom, 1, 1 ); |
LevelTxt = new QLabel( LayerGroup, "LevelTxt" ); |
LevelTxt = new QLabel( " 0", LayerGroup, "LevelTxt" ); |
LevelTxt->setAlignment( Qt::AlignCenter ); |
LevelTxt->setText( " 0"); |
LayerGroupLayout->addMultiCellWidget( LevelTxt, 0, 1, 2, 2 ); |
layout60->addWidget( LayerGroup ); |
346,9 → 346,8 |
page_2 = new QWidget( TabStack, "page_2" ); |
pageLayout_2 = new QVBoxLayout( page_2, 0, 5, "pageLayout_2"); |
ShapeGroup = new QButtonGroup( page_2, "ShapeGroup" ); |
ShapeGroup = new QButtonGroup( "", page_2, "ShapeGroup" ); |
ShapeGroup->setFrameShape( QButtonGroup::NoFrame ); |
ShapeGroup->setTitle( "" ); |
ShapeGroup->setExclusive( true ); |
ShapeGroup->setColumnLayout(0, Qt::Vertical ); |
ShapeGroup->layout()->setSpacing( 2 ); |
355,8 → 354,7 |
ShapeGroup->layout()->setMargin( 0 ); |
ShapeGroupLayout = new QHBoxLayout( ShapeGroup->layout() ); |
ShapeGroupLayout->setAlignment( Qt::AlignTop ); |
SRect = new QLabel(ShapeGroup, "Text4a" ); |
SRect->setText( tr( "Shape:" ) ); |
SRect = new QLabel( tr( "Shape:" ), ShapeGroup, "SRect" ); |
ShapeGroupLayout->addWidget( SRect ); |
SCustom = new Autoforms( ShapeGroup ); |
ShapeGroupLayout->addWidget( SCustom ); |
368,9 → 366,8 |
Layout13 = new QHBoxLayout( 0, 0, 2, "Layout13"); |
Text4 = new QLabel( page_2, "Text4" ); |
Text4->setText( tr( "Round\nCorners:" ) ); |
Layout13->addWidget( Text4 ); |
rndcornersLabel = new QLabel( tr( "Round\nCorners:" ), page_2, "rndcornersLabel" ); |
Layout13->addWidget( rndcornersLabel ); |
RoundRect = new MSpinBox( page_2, 1 ); |
RoundRect->setSuffix( tr( " pt" ) ); |
382,30 → 379,24 |
page_2a = new QWidget( TabStack2, "page" ); |
pageLayout_2a = new QVBoxLayout( page_2a, 0, 5, "pageLayout_2"); |
Distance = new QGroupBox( page_2a, "Distance" ); |
Distance->setTitle( tr( "Distance of Text" ) ); |
Distance = new QGroupBox( tr( "Distance of Text" ), page_2a, "Distance" ); |
Distance->setColumnLayout(0, Qt::Vertical ); |
Distance->layout()->setSpacing( 2 ); |
Distance->layout()->setMargin( 5 ); |
DistanceLayout = new QGridLayout( Distance->layout() ); |
DistanceLayout->setAlignment( Qt::AlignTop ); |
Text14a = new QLabel( Distance, "Text14a" ); |
Text14a->setText( tr( "Columns:" ) ); |
DistanceLayout->addWidget( Text14a, 0, 0 ); |
Text14b = new LabelButton( Distance, tr("Gap:"), tr("Width:")); |
DistanceLayout->addWidget( Text14b, 1, 0 ); |
Text14 = new QLabel( Distance, "Text14" ); |
Text14->setText( tr( "Top:" ) ); |
DistanceLayout->addWidget( Text14, 2, 0 ); |
Text15 = new QLabel( Distance, "Text15" ); |
Text15->setText( tr( "Bottom:" ) ); |
DistanceLayout->addWidget( Text15, 3, 0 ); |
Text16 = new QLabel( Distance, "Text16" ); |
Text16->setText( tr( "Left:" ) ); |
DistanceLayout->addWidget( Text16, 4, 0 ); |
Text17 = new QLabel( Distance, "Text17" ); |
Text17->setText( tr( "Right:" ) ); |
DistanceLayout->addWidget( Text17, 5, 0 ); |
columnsLabel = new QLabel( tr( "Columns:" ), Distance, "columnsLabel" ); |
DistanceLayout->addWidget( columnsLabel, 0, 0 ); |
colgapLabel = new LabelButton( Distance, tr("Gap:"), tr("Width:")); |
DistanceLayout->addWidget( colgapLabel, 1, 0 ); |
topLabel = new QLabel( tr( "Top:" ), Distance, "topLabel" ); |
DistanceLayout->addWidget( topLabel, 2, 0 ); |
bottomLabel = new QLabel( tr( "Bottom:" ), Distance, "bottomLabel" ); |
DistanceLayout->addWidget( bottomLabel, 3, 0 ); |
leftLabel = new QLabel( tr( "Left:" ), Distance, "leftLabel" ); |
DistanceLayout->addWidget( leftLabel, 4, 0 ); |
rightLabel = new QLabel( tr( "Right:" ), Distance, "rightLabel" ); |
DistanceLayout->addWidget( rightLabel, 5, 0 ); |
DCol = new QSpinBox( Distance, "Cols" ); |
DCol->setMaxValue( 3000 ); |
DCol->setMinValue( 1 ); |
445,19 → 436,17 |
page_2b = new QWidget( TabStack2, "page" ); |
pageLayout_2b = new QVBoxLayout( page_2b, 0, 5, "pageLayout_2"); |
Distance2 = new QGroupBox( page_2b, "Distance" ); |
Distance2->setTitle( tr( "Path Text Properties" ) ); |
Distance2 = new QGroupBox( tr( "Path Text Properties" ), page_2b, "Distance" ); |
Distance2->setColumnLayout(0, Qt::Vertical ); |
Distance2->layout()->setSpacing( 2 ); |
Distance2->layout()->setMargin( 5 ); |
DistanceLayout2 = new QGridLayout( Distance2->layout() ); |
DistanceLayout2->setAlignment( Qt::AlignTop ); |
NormText2 = new QCheckBox( Distance2, "NormText" ); |
NormText2->setText( tr( "Show Curve" ) ); |
DistanceLayout2->addMultiCellWidget( NormText2, 0, 0, 0, 1 ); |
TextLabel3 = new QLabel( Distance2, "TextLabel3" ); |
TextLabel3->setText( tr( "Start Offset:" ) ); |
DistanceLayout2->addWidget( TextLabel3, 1, 0); |
showcurveCheckBox = new QCheckBox( Distance2, "showcurveCheckBox" ); |
showcurveCheckBox->setText( tr( "Show Curve" ) ); |
DistanceLayout2->addMultiCellWidget( showcurveCheckBox, 0, 0, 0, 1 ); |
startoffsetLabel = new QLabel( tr( "Start Offset:" ), Distance2, "startoffsetLabel" ); |
DistanceLayout2->addWidget( startoffsetLabel, 1, 0); |
Dist = new MSpinBox( Distance2, 1 ); |
Dist->setSuffix( tr( " pt" ) ); |
Dist->setMaxValue( 300 ); |
464,9 → 453,8 |
Dist->setMinValue( 0 ); |
Dist->setLineStep(10); |
DistanceLayout2->addWidget( Dist, 1, 1); |
TextLabel2 = new QLabel( Distance2, "TextLabel2" ); |
TextLabel2->setText( tr( "Distance from Curve:" ) ); |
DistanceLayout2->addWidget( TextLabel2, 2, 0); |
distfromcurveLabel = new QLabel( tr( "Distance from Curve:" ), Distance2, "distfromcurveLabel" ); |
DistanceLayout2->addWidget( distfromcurveLabel, 2, 0); |
LineW = new MSpinBox( Distance2, 1 ); |
LineW->setSuffix( tr( " pt" ) ); |
LineW->setMaxValue( 300 ); |
494,9 → 482,8 |
Fonts->setMaximumSize(190, 30); |
layout41->addMultiCellWidget( Fonts, 0, 0, 0, 1 ); |
Text20 = new QLabel( page_3, "Text20" ); |
Text20->setText( tr("Font Size:")); |
layout41->addWidget( Text20, 1, 0 ); |
fontsizeLabel = new QLabel( tr("Font Size:"), page_3, "fontsizeLabel" ); |
layout41->addWidget( fontsizeLabel, 1, 0 ); |
Size = new MSpinBox( page_3, 1 ); |
Size->setPrefix( "" ); |
Size->setSuffix( tr( " pt" ) ); |
506,8 → 493,7 |
layout46->addLayout( layout41 ); |
layout22 = new QHBoxLayout( 0, 0, 5, "layout22"); |
ScaleTxt = new QLabel( page_3, "ScaleTxt" ); |
ScaleTxt->setText( tr("Width:")); |
ScaleTxt = new QLabel( tr("Width:"), page_3, "ScaleTxt" ); |
layout22->addWidget( ScaleTxt ); |
ChScale = new QSpinBox( page_3, "ChScale" ); |
ChScale->setMaxValue( 400 ); |
518,8 → 504,7 |
layout46->addLayout( layout22 ); |
layout23 = new QHBoxLayout( 0, 0, 5, "layout23"); |
StrokeIcon = new QLabel( page_3, "StrokeIcon" ); |
StrokeIcon->setText(""); |
StrokeIcon = new QLabel( "", page_3, "StrokeIcon" ); |
StrokeIcon->setPixmap(loadIcon("Stiftalt.xpm")); |
StrokeIcon->setScaledContents( false ); |
layout23->addWidget( StrokeIcon ); |
528,15 → 513,13 |
layout23->addWidget( TxStroke ); |
QSpacerItem* spacer2S = new QSpacerItem( 0, 0, QSizePolicy::Expanding, QSizePolicy::Minimum ); |
layout23->addItem( spacer2S ); |
ShadeTxt1 = new QLabel( page_3, "ShadeTxt" ); |
ShadeTxt1->setText( tr( "Shade:" ) ); |
ShadeTxt1 = new QLabel( tr( "Shade:" ), page_3, "ShadeTxt" ); |
layout23->addWidget( ShadeTxt1 ); |
PM1 = new ShadeButton(page_3); |
layout23->addWidget( PM1 ); |
layout46->addLayout( layout23 ); |
layout24 = new QHBoxLayout( 0, 0, 5, "layout24"); |
FillIcon = new QLabel( page_3, "FillIcon" ); |
FillIcon->setText(""); |
FillIcon = new QLabel( "", page_3, "FillIcon" ); |
FillIcon->setPixmap(loadIcon("fill.png")); |
FillIcon->setScaledContents( false ); |
layout24->addWidget( FillIcon ); |
545,8 → 528,7 |
layout24->addWidget( TxFill ); |
QSpacerItem* spacer2Sf = new QSpacerItem( 0, 0, QSizePolicy::Expanding, QSizePolicy::Minimum ); |
layout24->addItem( spacer2Sf ); |
ShadeTxt2 = new QLabel( page_3, "ShadeTxt" ); |
ShadeTxt2->setText( tr( "Shade:" ) ); |
ShadeTxt2 = new QLabel( tr( "Shade:" ), page_3, "ShadeTxt" ); |
layout24->addWidget( ShadeTxt2 ); |
PM2 = new ShadeButton(page_3); |
layout24->addWidget( PM2 ); |
570,8 → 552,7 |
GroupAlign = new AlignSelect(page_3); |
pageLayout_3->addWidget( GroupAlign ); |
GroupBox3 = new QGroupBox( page_3, "GroupBox3" ); |
GroupBox3->setTitle( tr( "Custom Spacing" ) ); |
GroupBox3 = new QGroupBox( tr( "Custom Spacing" ), page_3, "GroupBox3" ); |
GroupBox3->setColumnLayout(0, Qt::Vertical ); |
GroupBox3->layout()->setSpacing( 2 ); |
GroupBox3->layout()->setMargin( 5 ); |
586,28 → 567,24 |
Extra->setSuffix( tr( " pt" ) ); |
GroupBox3Layout->addWidget( Extra, 0, 1 ); |
Text5 = new QLabel( GroupBox3, "Text5" ); |
Text5->setText( tr( "Kerning:" ) ); |
GroupBox3Layout->addWidget( Text5, 0, 0 ); |
kerningLabel = new QLabel( tr( "Kerning:" ), GroupBox3, "kerningLabel" ); |
GroupBox3Layout->addWidget( kerningLabel, 0, 0 ); |
Text6 = new QLabel( GroupBox3, "Text6" ); |
Text6->setText( tr( "Line Spacing:" ) ); |
linespacingLabel = new QLabel( tr( "Line Spacing:" ), GroupBox3, "linespacingLabel" ); |
GroupBox3Layout->addWidget( linespacingLabel, 1, 0 ); |
GroupBox3Layout->addWidget( Text6, 1, 0 ); |
pageLayout_3->addWidget( GroupBox3 ); |
GroupBox3aLayout = new QGridLayout( 0, 1, 1, 0, 5, "Layout25"); |
StilT = new QLabel( page_3, "Stil" ); |
StilT->setText( tr("Style:")); |
GroupBox3aLayout->addWidget( StilT, 0, 0 ); |
styleLabel = new QLabel( tr("Style:"), page_3, "styleLabel" ); |
GroupBox3aLayout->addWidget( styleLabel, 0, 0 ); |
Spal = new Spalette(page_3); |
GroupBox3aLayout->addWidget( Spal, 0, 1 ); |
SprachT = new QLabel( page_3, "Sprache" ); |
SprachT->setText( tr("Language:")); |
GroupBox3aLayout->addWidget( SprachT, 1, 0 ); |
LangCombo = new QComboBox( true, page_3, "Lang" ); |
LangCombo->setEditable(false); |
GroupBox3aLayout->addWidget( LangCombo, 1, 1 ); |
langLabel = new QLabel( tr("Language:"), page_3, "langLabel" ); |
GroupBox3aLayout->addWidget( langLabel, 1, 0 ); |
langCombo = new QComboBox( true, page_3, "Lang" ); |
langCombo->setEditable(false); |
GroupBox3aLayout->addWidget( langCombo, 1, 1 ); |
pageLayout_3->addLayout(GroupBox3aLayout); |
QSpacerItem* spacer8 = new QSpacerItem( 0, 0, QSizePolicy::Minimum, QSizePolicy::Expanding ); |
623,27 → 600,23 |
pageLayout_4->addWidget( FreeScale ); |
layout43 = new QGridLayout( 0, 1, 1, 0, 5, "layout43"); |
Text11 = new QLabel( page_4, "Text11" ); |
Text11->setText( tr( "X-Pos.:" ) ); |
layout43->addWidget( Text11, 0, 0 ); |
xposImgLabel = new QLabel( tr( "X-Pos.:" ), page_4, "xposImgLabel" ); |
layout43->addWidget( xposImgLabel, 0, 0 ); |
LXpos = new MSpinBox( page_4, 2 ); |
LXpos->setSuffix( tr( " pt" ) ); |
layout43->addWidget( LXpos, 0, 1 ); |
Text11a = new QLabel( page_4, "Text11a" ); |
Text11a->setText( tr( "Y-Pos.:" ) ); |
layout43->addWidget( Text11a, 1, 0 ); |
yposImgLabel = new QLabel( tr( "Y-Pos.:" ), page_4, "yposImgLabel" ); |
layout43->addWidget( yposImgLabel, 1, 0 ); |
LYpos = new MSpinBox( page_4, 2 ); |
LYpos->setSuffix( tr( " pt" ) ); |
layout43->addWidget( LYpos, 1, 1 ); |
Text12 = new QLabel( page_4, "Text12" ); |
Text12->setText( tr( "X-Scale:" ) ); |
layout43->addWidget( Text12, 2, 0 ); |
xscaleLabel = new QLabel( tr( "X-Scale:" ), page_4, "xscaleLabel" ); |
layout43->addWidget( xscaleLabel, 2, 0 ); |
ScaleX = new MSpinBox( page_4, 1 ); |
ScaleX->setSuffix( tr( " %" ) ); |
layout43->addWidget( ScaleX, 2, 1 ); |
Text13 = new QLabel( page_4, "Text13" ); |
Text13->setText( tr( "Y-Scale:" ) ); |
layout43->addWidget( Text13, 3, 0 ); |
yscaleLabel = new QLabel( tr( "Y-Scale:" ), page_4, "yscaleLabel" ); |
layout43->addWidget( yscaleLabel, 3, 0 ); |
ScaleY = new MSpinBox( page_4, 1 ); |
ScaleY->setSuffix( tr( " %" ) ); |
layout43->addWidget( ScaleY, 3, 1 ); |
678,8 → 651,7 |
Layout24->addLayout( Layout18 ); |
pageLayout_4->addLayout( Layout24 ); |
GroupBoxCM = new QGroupBox( page_4, "GroupBoxcm" ); |
GroupBoxCM->setTitle(""); |
GroupBoxCM = new QGroupBox( "", page_4, "GroupBoxcm" ); |
GroupBoxCM->setColumnLayout(0, Qt::Vertical ); |
GroupBoxCM->layout()->setSpacing( 2 ); |
GroupBoxCM->layout()->setMargin( 5 ); |
687,14 → 659,12 |
GroupBoxCM->setFrameShadow( QFrame::Plain ); |
GroupBoxCMLayout = new QVBoxLayout( GroupBoxCM->layout() ); |
GroupBoxCMLayout->setAlignment( Qt::AlignTop ); |
TextCms1 = new QLabel( GroupBoxCM, "Text1" ); |
TextCms1->setText( tr( "Input Profile:" ) ); |
TextCms1 = new QLabel( tr( "Input Profile:" ), GroupBoxCM, "xposLabel" ); |
GroupBoxCMLayout->addWidget( TextCms1 ); |
InputP = new QComboBox( true, GroupBoxCM, "InputP" ); |
InputP->setEditable(false); |
GroupBoxCMLayout->addWidget(InputP); |
TextCms2 = new QLabel( GroupBoxCM, "Text2" ); |
TextCms2->setText( tr( "Rendering Intent:" ) ); |
TextCms2 = new QLabel( tr( "Rendering Intent:" ), GroupBoxCM, "TextCms2" ); |
GroupBoxCMLayout->addWidget(TextCms2); |
MonitorI = new QComboBox( true, GroupBoxCM, "MonitorI" ); |
MonitorI->insertItem( tr( "Perceptual" ) ); |
713,8 → 683,7 |
pageLayout_5 = new QVBoxLayout( page_5, 0, 5, "pageLayout_5"); |
Layout13_2 = new QHBoxLayout( 0, 0, 4, "Layout13_2"); |
LineModeT = new QLabel( page_5, "LModeText" ); |
LineModeT->setText( tr( "Basepoint:" ) ); |
LineModeT = new QLabel( tr( "Basepoint:" ), page_5, "LModeText" ); |
Layout13_2->addWidget( LineModeT ); |
LineMode = new QComboBox( true, page_5, "LMode" ); |
LineMode->setEditable(false); |
727,20 → 696,17 |
pageLayout_5->addLayout( Layout13_2 ); |
Layout12_2 = new QGridLayout( 0, 1, 1, 0, 3, "Layout12_2"); |
Text8 = new QLabel( page_5, "Text8" ); |
Text8->setText( tr( "Type of Line:" ) ); |
Layout12_2->addWidget( Text8, 0, 0 ); |
linetypeLabel = new QLabel( tr( "Type of Line:" ), page_5, "linetypeLabel" ); |
Layout12_2->addWidget( linetypeLabel, 0, 0 ); |
LStyle = new LineCombo(page_5); |
Layout12_2->addWidget( LStyle, 1, 0 ); |
TextLabel1 = new QLabel( page_5, "TextLabel1" ); |
TextLabel1->setText( tr( "Line Width:" ) ); |
Layout12_2->addWidget( TextLabel1, 2, 0 ); |
linewidthLabel = new QLabel(tr( "Line Width:" ), page_5, "linewidthLabel" ); |
Layout12_2->addWidget( linewidthLabel, 2, 0 ); |
LSize = new MSpinBox( page_5, 1 ); |
LSize->setSuffix( tr( " pt" ) ); |
Layout12_2->addWidget( LSize, 3, 0 ); |
Text9 = new QLabel( page_5, "Text9" ); |
Text9->setText( tr( "Edges:" ) ); |
Layout12_2->addWidget( Text9, 4, 0 ); |
edgesLabel = new QLabel( tr( "Edges:" ), page_5, "edgesLabel" ); |
Layout12_2->addWidget( edgesLabel, 4, 0 ); |
LJoinStyle = new QComboBox( true, page_5, "LJoin" ); |
LJoinStyle->setEditable(false); |
LJoinStyle->insertItem(loadIcon("MiterJoin.png"), tr( "Miter Join" ) ); |
747,9 → 713,8 |
LJoinStyle->insertItem(loadIcon("BevelJoin.png"), tr( "Bevel Join" ) ); |
LJoinStyle->insertItem(loadIcon("RoundJoin.png"), tr( "Round Join" ) ); |
Layout12_2->addWidget( LJoinStyle, 5, 0 ); |
Text10 = new QLabel( page_5, "Text10" ); |
Text10->setText( tr( "Endings:" ) ); |
Layout12_2->addWidget( Text10, 6, 0 ); |
endingsLabel = new QLabel( tr( "Endings:" ), page_5, "endingsLabel" ); |
Layout12_2->addWidget( endingsLabel, 6, 0 ); |
LEndStyle = new QComboBox( true, page_5, "LCap" ); |
LEndStyle->setEditable(false); |
LEndStyle->insertItem(loadIcon("ButtCap.png"), tr( "Flat Cap" ) ); |
770,8 → 735,7 |
page_5b = new QWidget( TabStack3, "page" ); |
pageLayout_5b = new QVBoxLayout( page_5b, 0, 5, "pageLayout_5a"); |
TLines = new QGroupBox( page_5b, "Distance" ); |
TLines->setTitle( tr( "Cell Lines" ) ); |
TLines = new QGroupBox( tr( "Cell Lines" ), page_5b, "Distance" ); |
TLines->setColumnLayout(0, Qt::Vertical ); |
TLines->layout()->setSpacing( 2 ); |
TLines->layout()->setMargin( 5 ); |
796,6 → 760,7 |
Cpal = new Cpalette(this); |
TabStack->addWidget(Cpal, 5); |
MpalLayout->addWidget( TabStack ); |
QToolTip::add( NameEdit, tr( "Name of selected object" ) ); |
QToolTip::add( Xpos, tr( "Horizontal position of current basepoint" ) ); |
QToolTip::add( Ypos, tr( "Vertical position of current basepoint" ) ); |
802,7 → 767,7 |
QToolTip::add( Width, tr( "Width" ) ); |
QToolTip::add( Height, tr( "Height" ) ); |
QToolTip::add( Rot, tr( "Rotation of object at current basepoint" ) ); |
QToolTip::add( Text3r, tr( "Point from which measurements or rotation angles are referenced" ) ); |
QToolTip::add( basepointLabel, tr( "Point from which measurements or rotation angles are referenced" ) ); |
QToolTip::add( TopLeft, tr( "Select top left for basepoint" ) ); |
QToolTip::add( TopRight, tr( "Select top right for basepoint" ) ); |
QToolTip::add( BottomLeft, tr( "Select bottom left for basepoint" ) ); |
832,7 → 797,7 |
QToolTip::add( Extra, tr( "Manual Kerning" ) ); |
QToolTip::add( LineSp, tr( "Line Spacing" ) ); |
QToolTip::add( Spal, tr( "Style of current paragraph" ) ); |
QToolTip::add( LangCombo, tr( "Language of object" ) ); |
QToolTip::add( langCombo, tr( "Language of object" ) ); |
QToolTip::add( LineMode, tr( "Change settings for left or end points" ) ); |
QToolTip::add( LStyle, tr( "Pattern of line" ) ); |
845,7 → 810,7 |
QToolTip::add( EditShape, tr( "Edit shape of the frame..." ) ); |
QToolTip::add( RoundRect, tr( "Set radius of corner rounding" ) ); |
QToolTip::add( DCol, tr( "Number of columns in text frame" ) ); |
QToolTip::add( Text14b, tr("Switches between Gap or Column width")); |
QToolTip::add( colgapLabel, tr("Switches between Gap or Column width")); |
QToolTip::add( DGap, tr( "Distance between columns" ) ); |
QToolTip::add( DTop, tr( "Distance of text from top of frame" ) ); |
QToolTip::add( DBottom, tr( "Distance of text from bottom of frame" ) ); |
907,7 → 872,7 |
connect(DLeft, SIGNAL(valueChanged(int)), this, SLOT(NewTDist())); |
connect(DRight, SIGNAL(valueChanged(int)), this, SLOT(NewTDist())); |
connect(DBottom, SIGNAL(valueChanged(int)), this, SLOT(NewTDist())); |
connect(buttonGroup5, SIGNAL(clicked(int)), this, SLOT(SelTab(int))); |
connect(proppalButtonGrp, SIGNAL(clicked(int)), this, SLOT(SelTab(int))); |
connect(StyledLine, SIGNAL(clicked(QListBoxItem*)), this, SLOT(SetSTline(QListBoxItem*))); |
connect(Fonts, SIGNAL(activated(int)), this, SLOT(NewTFont(int))); |
connect(TxFill, SIGNAL(activated(int)), this, SLOT(newTxtFill())); |
918,19 → 883,19 |
connect(Locked, SIGNAL(clicked()), this, SLOT(handleLock())); |
connect(NoPrint, SIGNAL(clicked()), this, SLOT(handlePrint())); |
connect(NoResize, SIGNAL(clicked()), this, SLOT(handleResize())); |
connect(NormText2, SIGNAL(clicked()), this, SLOT(handlePathLine())); |
connect(showcurveCheckBox, SIGNAL(clicked()), this, SLOT(handlePathLine())); |
connect(Dist, SIGNAL(valueChanged(int)), this, SLOT(handlePathDist())); |
connect(LineW, SIGNAL(valueChanged(int)), this, SLOT(handlePathOffs())); |
connect(InputP, SIGNAL(activated(const QString&)), this, SLOT(ChProf(const QString&))); |
connect(MonitorI, SIGNAL(activated(int)), this, SLOT(ChIntent())); |
connect(NameEdit, SIGNAL(Leaved()), this, SLOT(NewName())); |
connect(LangCombo, SIGNAL(activated(int)), this, SLOT(NewLanguage())); |
connect(langCombo, SIGNAL(activated(int)), this, SLOT(NewLanguage())); |
connect( TabsButton, SIGNAL( clicked() ), this, SLOT( ManageTabs() ) ); |
connect( TopLine, SIGNAL( clicked() ), this, SLOT( HandleTLines() ) ); |
connect( LeftLine, SIGNAL( clicked() ), this, SLOT( HandleTLines() ) ); |
connect( RightLine, SIGNAL( clicked() ), this, SLOT( HandleTLines() ) ); |
connect( BottomLine, SIGNAL( clicked() ), this, SLOT( HandleTLines() ) ); |
connect( Text14b, SIGNAL( clicked() ), this, SLOT( HandleGapSwitch() ) ); |
connect( colgapLabel, SIGNAL( clicked() ), this, SLOT( HandleGapSwitch() ) ); |
connect( Cpal, SIGNAL(NewSpecial(double, double, double, double )), this, SLOT(NewSpGradient(double, double, double, double ))); |
HaveItem = false; |
Xpos->setValue(0); |
1076,7 → 1041,7 |
DCol->setMinValue(1); |
DGap->setMinValue(0); |
DCol->setValue(i->Cols); |
if (Text14b->getState()) |
if (colgapLabel->getState()) |
{ |
DGap->setMaxValue(QMAX((i->Width / i->Cols - i->Extra - i->RExtra)*UmReFaktor, 0)); |
DGap->setValue(i->ColGap*UmReFaktor); |
1100,7 → 1065,7 |
Textflow->setChecked(i->Textflow); |
Textflow2->setChecked(i->Textflow2); |
ToggleFlow(); |
LangCombo->setCurrentText(i->Language); |
langCombo->setCurrentText(i->Language); |
bool setter; |
if (i->NamedLStyle == "") |
{ |
1158,7 → 1123,7 |
if (i->PType == 8) |
{ |
TabStack2->raiseWidget(1); |
NormText2->setChecked(i->PoShow); |
showcurveCheckBox->setChecked(i->PoShow); |
LineW->setValue(i->BaseOffs * -1); |
Dist->setValue(i->Extra); |
} |
1173,37 → 1138,31 |
else |
RoundRect->setEnabled(false); |
} |
if ((i->PType == 5) && LMode) { |
xposLabel->setText( tr( "X1:" ) ); |
widthLabel->setText( tr( "X2:" ) ); |
yposLabel->setText( tr( "Y1:" ) ); |
heightLabel->setText( tr( "Y2:" ) ); |
Rot->setEnabled(false); |
} else { |
xposLabel->setText( tr( "X-Pos:" ) ); |
widthLabel->setText( tr( "Width:" ) ); |
yposLabel->setText( tr( "Y-Pos:" ) ); |
heightLabel->setText( tr( "Height:" ) ); |
Rot->setEnabled(true); |
} |
if (i->PType == 5) |
{ |
Kette2->setEnabled(false); |
if (LMode) |
{ |
Text1->setText( tr( "X1:" ) ); |
Text2->setText( tr( "X2:" ) ); |
Text1a->setText( tr( "Y1:" ) ); |
Text2a->setText( tr( "Y2:" ) ); |
Rot->setEnabled(false); |
Height->setEnabled(true); |
} |
else |
{ |
Text1->setText( tr( "X-Pos:" ) ); |
Text2->setText( tr( "Width:" ) ); |
Text1a->setText( tr( "Y-Pos:" ) ); |
Text2a->setText( tr( "Height:" ) ); |
Rot->setEnabled(true); |
Height->setEnabled(false); |
} |
HaveItem = true; |
return; |
} |
else |
{ |
Text1->setText( tr( "X-Pos:" ) ); |
Text2->setText( tr( "Width:" ) ); |
Text1a->setText( tr( "Y-Pos:" ) ); |
Text2a->setText( tr( "Height:" ) ); |
Rot->setEnabled(true); |
Kette2->setEnabled(true); |
if (i->PType == 2) |
{ |
1244,10 → 1203,10 |
doc->ActPage->RCenter = FPoint(gx, gy + gh); |
if (BottomRight->isChecked()) |
doc->ActPage->RCenter = FPoint(gx + gw, gy + gh); |
Text1->setText( tr( "X-Pos:" ) ); |
Text2->setText( tr( "Width:" ) ); |
Text1a->setText( tr( "Y-Pos:" ) ); |
Text2a->setText( tr( "Height:" ) ); |
xposLabel->setText( tr( "X-Pos:" ) ); |
widthLabel->setText( tr( "Width:" ) ); |
yposLabel->setText( tr( "Y-Pos:" ) ); |
heightLabel->setText( tr( "Height:" ) ); |
HaveItem = false; |
Xpos->setValue(0); |
Ypos->setValue(0); |
1291,10 → 1250,10 |
switch (nr) |
{ |
case -1: |
Text1->setText( tr( "X-Pos:" ) ); |
Text2->setText( tr( "Width:" ) ); |
Text1a->setText( tr( "Y-Pos:" ) ); |
Text2a->setText( tr( "Height:" ) ); |
xposLabel->setText( tr( "X-Pos:" ) ); |
widthLabel->setText( tr( "Width:" ) ); |
yposLabel->setText( tr( "Y-Pos:" ) ); |
heightLabel->setText( tr( "Height:" ) ); |
Rot->setEnabled(true); |
Height->setEnabled(true); |
HaveItem = false; |
1664,7 → 1623,7 |
if (tmp) |
{ |
DCol->setMaxValue(QMAX(qRound(CurItem->Width / QMAX(CurItem->ColGap, 10.0)), 1)); |
if (Text14b->getState()) |
if (colgapLabel->getState()) |
{ |
DGap->setMaxValue(QMAX((CurItem->Width / CurItem->Cols - CurItem->Extra - CurItem->RExtra)*UmReFaktor, 0)); |
DGap->setValue(CurItem->ColGap*UmReFaktor); |
2253,7 → 2212,7 |
{ |
setCols(CurItem->Cols, CurItem->ColGap); |
QToolTip::remove(DGap); |
if (Text14b->getState()) |
if (colgapLabel->getState()) |
QToolTip::add( DGap, tr( "Distance between columns" ) ); |
else |
QToolTip::add( DGap, tr( "Column width" ) ); |
2279,7 → 2238,7 |
return; |
if ((HaveDoc) && (HaveItem)) |
{ |
if (Text14b->getState()) |
if (colgapLabel->getState()) |
CurItem->ColGap = DGap->value() / UmReFaktor; |
else |
{ |
2401,10 → 2360,10 |
return; |
if (LineMode->currentItem() == 0) |
{ |
Text1->setText( tr( "X-Pos:" ) ); |
Text2->setText( tr( "Width:" ) ); |
Text1a->setText( tr( "Y-Pos:" ) ); |
Text2a->setText( tr( "Height:" ) ); |
xposLabel->setText( tr( "X-Pos:" ) ); |
widthLabel->setText( tr( "Width:" ) ); |
yposLabel->setText( tr( "Y-Pos:" ) ); |
heightLabel->setText( tr( "Height:" ) ); |
Rot->setEnabled(true); |
Height->setEnabled(false); |
LMode = false; |
2411,10 → 2370,10 |
} |
else |
{ |
Text1->setText( tr( "X1:" ) ); |
Text2->setText( tr( "X2:" ) ); |
Text1a->setText( tr( "Y1:" ) ); |
Text2a->setText( tr( "Y2:" ) ); |
xposLabel->setText( tr( "X1:" ) ); |
widthLabel->setText( tr( "X2:" ) ); |
yposLabel->setText( tr( "Y1:" ) ); |
heightLabel->setText( tr( "Y2:" ) ); |
Rot->setEnabled(false); |
Height->setEnabled(true); |
LMode = true; |
3111,7 → 3070,7 |
return; |
if ((HaveDoc) && (HaveItem)) |
{ |
CurItem->PoShow = NormText2->isChecked(); |
CurItem->PoShow = showcurveCheckBox->isChecked(); |
doc->ActPage->RefreshItem(CurItem); |
emit DocChanged(); |
} |
3188,15 → 3147,15 |
} |
} |
void Mpalette::fillLangCombo(QMap<QString,QString> Sprachen) |
void Mpalette::fillLangCombo(QMap<QString,QString> langMap) |
{ |
if (ScApp->ScriptRunning) |
return; |
LangCombo->clear(); |
langCombo->clear(); |
QMap<QString,QString>::Iterator it; |
for (it = Sprachen.begin(); it != Sprachen.end(); ++it) |
LangCombo->insertItem(it.key()); |
LangCombo->listBox()->setMinimumWidth(LangCombo->listBox()->maxItemWidth()+24); |
for (it = langMap.begin(); it != langMap.end(); ++it) |
langCombo->insertItem(it.key()); |
langCombo->listBox()->setMinimumWidth(langCombo->listBox()->maxItemWidth()+24); |
} |
void Mpalette::NewLanguage() |
3203,7 → 3162,7 |
{ |
if ((HaveDoc) && (HaveItem)) |
{ |
CurItem->Language = LangCombo->currentText(); |
CurItem->Language = langCombo->currentText(); |
emit DocChanged(); |
} |
} |
/trunk/Scribus/scribus/vruler.cpp |
---|
65,6 → 65,9 |
double of, xl, iter, iter2; |
double sc = doku->Scale; |
int cor = 1; |
QFont ff = font(); |
ff.setPointSize(8); |
setFont(ff); |
switch (doku->Einheit) |
{ |
case 0: |
/trunk/Scribus/scribus/pageitem.cpp |
---|
474,17 → 474,23 |
if ((Pcolor != "None") || (GrType != 0)) |
{ |
FPointArray cli; |
FPoint Start; |
bool firstp = true; |
for (uint n = 0; n < PoLine.size()-3; n += 4) |
{ |
if (firstp) |
{ |
Start = PoLine.point(n); |
firstp = false; |
} |
if (PoLine.point(n).x() > 900000) |
{ |
cli.addPoint(PoLine.point(n-2)); |
cli.addPoint(PoLine.point(n-2)); |
cli.addPoint(cli.point(0)); |
cli.addPoint(cli.point(0)); |
p->setupPolygon(&cli); |
p->drawPolygon(); |
cli.resize(0); |
cli.addPoint(Start); |
cli.addPoint(Start); |
cli.setMarker(); |
firstp = true; |
continue; |
} |
cli.addPoint(PoLine.point(n)); |
497,11 → 503,11 |
FPoint l1 = cli.point(cli.size()-2); |
cli.addPoint(l1); |
cli.addPoint(l1); |
cli.addPoint(cli.point(0)); |
cli.addPoint(cli.point(0)); |
p->setupPolygon(&cli); |
p->drawPolygon(); |
cli.addPoint(Start); |
cli.addPoint(Start); |
} |
p->setupPolygon(&cli); |
p->drawPolygon(); |
} |
p->setupPolygon(&PoLine, false); |
if (NamedLStyle == "") |
/trunk/Scribus/scribus/libabout/about.cpp |
---|
56,7 → 56,7 |
tabLayout1->addWidget( PixmapLabel1 ); |
BuildID = new QLabel( tab, "BB" ); |
BuildID->setAlignment(Qt::AlignCenter); |
QString bu = tr("%1. %2 %3 ").arg("04").arg("July").arg("2004"); |
QString bu = tr("%1. %2 %3 ").arg("12").arg("July").arg("2004"); |
#ifdef HAVE_CMS |
bu += "C"; |
#else |
199,7 → 199,7 |
TextView4 = new QTextView( tab_4, "TextView4" ); |
TextView4->setText(QString::fromUtf8( |
"<table><tr><td><b>" + tr("Homepage and online reference").utf8() + "</b></td><td></td></tr>" + |
"<tr><td colspan=\"2\"><p><a href=\"http://scribus.net\">http://scribus.net</a></p></td></tr>" + |
"<tr><td colspan=\"2\"><p><a href=\"http://www.scribus.net\">http://www.scribus.net</a></p></td></tr>" + |
"<tr><td><b>" + tr("Mailing list").utf8() + "</b></td><td></td></tr>" + |
"<tr><td colspan=\"2\"><p><a href=\"http://nashi.altmuehlnet.de/mailman/listinfo/scribus\">http://nashi.altmuehlnet.de/mailman/listinfo/scribus</a></p></td></tr>" + |
"<tr><td><b>" + tr("Bugs and feature requests").utf8() + "</b></td><td></td></tr>" + |
/trunk/Scribus/scribus/newfile.cpp |
---|
453,26 → 453,18 |
void NewDoc::setOrien(int ori) |
{ |
double br; |
setSize(ComboBox1->currentItem()); |
disconnect(Breite, SIGNAL(valueChanged(int)), this, SLOT(setBreite(int))); |
disconnect(Hoehe, SIGNAL(valueChanged(int)), this, SLOT(setHoehe(int))); |
if (ori == 0) |
if (ori != Orient) |
{ |
if (ComboBox1->currentItem() == 30) |
{ |
br = Breite->value(); |
Breite->setValue(Hoehe->value()); |
Hoehe->setValue(br); |
} |
Orient = 0; |
} |
else |
{ |
Orient = 1; |
br = Breite->value(); |
Breite->setValue(Hoehe->value()); |
Hoehe->setValue(br); |
} |
if (ori == 0) |
Orient = 0; |
else |
Orient = 1; |
RightR->setMaxValue(Breite->value() - LeftR->value()); |
LeftR->setMaxValue(Breite->value() - RightR->value()); |
TopR->setMaxValue(Hoehe->value() - BottomR->value()); |
486,13 → 478,16 |
if (ComboBox1->currentItem() == 30) |
setSize(ComboBox1->currentItem()); |
else |
{ |
setSize(ComboBox1->currentItem()); |
setOrien(ComboBox2->currentItem()); |
} |
} |
void NewDoc::setSize(int gr) |
{ |
Pagebr = Breite->value(); |
Pageho = Hoehe->value(); |
Pagebr = Breite->value() / Umrech; |
Pageho = Hoehe->value() / Umrech; |
disconnect(Breite, SIGNAL(valueChanged(int)), this, SLOT(setBreite(int))); |
disconnect(Hoehe, SIGNAL(valueChanged(int)), this, SLOT(setHoehe(int))); |
Breite->setEnabled(false); |
/trunk/Scribus/scribus/hruler.cpp |
---|
365,6 → 365,9 |
double of, xl, iter, iter2; |
double sc = doku->Scale; |
int cor = 1; |
QFont ff = font(); |
ff.setPointSize(8); |
setFont(ff); |
switch (doku->Einheit) |
{ |
case 0: |
/trunk/Scribus/scribus/scribus.cpp |
---|
351,7 → 351,7 |
Prefs.GridShown = false; |
Prefs.MarginsShown = true; |
Prefs.GuidesShown = true; |
Prefs.BaseShown = true; |
Prefs.BaseShown = false; |
Prefs.ClipMargin = true; |
Prefs.PagesSbS = true; |
Prefs.RecentDocs.clear(); |
4546,14 → 4546,6 |
setSepal(PalettesStat[5]); |
setBookpal(PalettesStat[6]); |
setMapal(PalettesStat[7]); |
Mpal->move(Prefs.Mpalx, Prefs.Mpaly); |
MaPal->move(Prefs.Mapalx, Prefs.Mapaly); |
Tpal->move(Prefs.Tpalx, Prefs.Tpaly); |
Lpal->move(Prefs.Lpalx, Prefs.Lpaly); |
Sepal->move(Prefs.Sepalx, Prefs.Sepaly); |
BookPal->move(Prefs.Bopalx, Prefs.Bopaly); |
ScBook->move(Prefs.SCpalx, Prefs.SCpaly); |
ScBook->resize(Prefs.SCpalw, Prefs.SCpalh); |
} |
else |
{ |
4578,7 → 4570,10 |
void ScribusApp::setMapal(bool visible) |
{ |
if (visible) |
{ |
MaPal->show(); |
MaPal->move(Prefs.Mapalx, Prefs.Mapaly); |
} |
else |
{ |
Prefs.Mapalx = MaPal->pos().x(); |
4593,6 → 4588,7 |
{ |
Mpal->show(); |
Mpal->TabStack->raiseWidget(0); |
Mpal->move(Prefs.Mpalx, Prefs.Mpaly); |
} |
else |
{ |
4612,7 → 4608,10 |
void ScribusApp::setTpal(bool visible) |
{ |
if (visible) |
{ |
Tpal->show(); |
Tpal->move(Prefs.Tpalx, Prefs.Tpaly); |
} |
else |
{ |
Prefs.Tpalx = Tpal->pos().x(); |
4631,7 → 4630,11 |
void ScribusApp::setBpal(bool visible) |
{ |
if (visible) |
{ |
ScBook->show(); |
ScBook->move(Prefs.SCpalx, Prefs.SCpaly); |
ScBook->resize(Prefs.SCpalw, Prefs.SCpalh); |
} |
else |
{ |
Prefs.SCpalx = ScBook->pos().x(); |
4656,6 → 4659,7 |
if (HaveDoc) |
Lpal->setLayers(&doc->Layers, &doc->ActiveLayer); |
Lpal->show(); |
Lpal->move(Prefs.Lpalx, Prefs.Lpaly); |
} |
else |
{ |
4675,7 → 4679,10 |
void ScribusApp::setSepal(bool visible) |
{ |
if (visible) |
{ |
Sepal->show(); |
Sepal->move(Prefs.Sepalx, Prefs.Sepaly); |
} |
else |
{ |
Prefs.Sepalx = Sepal->pos().x(); |
4696,7 → 4703,10 |
void ScribusApp::setBookpal(bool visible) |
{ |
if (visible) |
{ |
BookPal->show(); |
BookPal->move(Prefs.Bopalx, Prefs.Bopaly); |
} |
else |
{ |
Prefs.Bopalx = BookPal->pos().x(); |
4873,6 → 4883,7 |
Npal->HaveNode(false, false); |
Npal->MoveNode->setOn(true); |
Npal->show(); |
Npal->move(Prefs.Npalx, Prefs.Npaly); |
doc->EditClipMode = 0; |
doc->EditClip = true; |
WerkTools->Select->setEnabled(false); |
6795,15 → 6806,6 |
setLpal(Prefs.Lpalv); |
setSepal(Prefs.Sepalv); |
setBookpal(Prefs.Bopalv); |
MaPal->move(Prefs.Mapalx, Prefs.Mapaly); |
Mpal->move(Prefs.Mpalx, Prefs.Mpaly); |
Tpal->move(Prefs.Tpalx, Prefs.Tpaly); |
Lpal->move(Prefs.Lpalx, Prefs.Lpaly); |
Sepal->move(Prefs.Sepalx, Prefs.Sepaly); |
BookPal->move(Prefs.Bopalx, Prefs.Bopaly); |
ScBook->move(Prefs.SCpalx, Prefs.SCpaly); |
ScBook->resize(Prefs.SCpalw, Prefs.SCpalh); |
Npal->move(Prefs.Npalx, Prefs.Npaly); |
setActiveWindow(); |
raise(); |
} |
/trunk/Scribus/scribus/plugins/scriptplugin/cmdobj.cpp |
---|
4,38 → 4,47 |
#include "cmdutil.h" |
#include "cmdvar.h" |
// commented out in the code due the Scribus Scripts backward compatibility |
#define ERROBJ "Oook! Object with given name exists already. Default name given." |
/* 03/29/2004 - pynone |
*/ |
PyObject *scribus_newrect(PyObject *self, PyObject* args) |
{ |
double x, y, b, h; |
char *Name = ""; |
if (!PyArg_ParseTuple(args, "dddd|s", &x, &y, &b, &h, &Name)) |
{ |
PyErr_SetString(PyExc_Exception, ERRPARAM + QString("CreateRect(x, y, w, h [, objectname])")); |
return NULL; |
} |
if (!Carrier->HaveDoc) |
{ |
Py_INCREF(Py_None); |
return Py_None; |
} |
{ |
Py_INCREF(Py_None); |
return Py_None; |
} |
int i = Carrier->doc->ActPage->PaintRect(ValueToPoint(x), ValueToPoint(y), |
ValueToPoint(b), ValueToPoint(h), |
Carrier->doc->Dwidth, Carrier->doc->Dbrush, Carrier->doc->Dpen); |
Carrier->doc->ActPage->SetRectFrame(Carrier->doc->ActPage->Items.at(i)); |
if (Name != "") |
Carrier->doc->ActPage->Items.at(i)->AnName = QString(Name); |
if (GetUniqueItem(QString(Name)) == NULL) |
(Name != "") ? Carrier->doc->ActPage->Items.at(i)->AnName = QString(Name) : NULL; |
/* else |
{ |
PyErr_SetString(PyExc_Exception, ERROBJ); |
return NULL; |
}*/ |
return PyString_FromString(Carrier->doc->ActPage->Items.at(i)->AnName); |
} |
/* 03/29/2004 - pynone |
*/ |
PyObject *scribus_newellipse(PyObject *self, PyObject* args) |
{ |
double x, y, b, h; |
char *Name = ""; |
if (!PyArg_ParseTuple(args, "dddd|s", &x, &y, &b, &h, &Name)) |
{ |
PyErr_SetString(PyExc_Exception, ERRPARAM + QString("CreateEllipse(x, y, w, h [, objectname])")); |
return NULL; |
} |
if (!Carrier->HaveDoc) |
{ |
Py_INCREF(Py_None); |
45,20 → 54,27 |
ValueToPoint(b), ValueToPoint(h), |
Carrier->doc->Dwidth, Carrier->doc->Dbrush, Carrier->doc->Dpen); |
Carrier->doc->ActPage->SetOvalFrame(Carrier->doc->ActPage->Items.at(i)); |
if (Name != "") |
Carrier->doc->ActPage->Items.at(i)->AnName = QString(Name); |
if (GetUniqueItem(QString(Name)) == NULL) |
if (Name != "") |
Carrier->doc->ActPage->Items.at(i)->AnName = QString(Name); |
/* else |
{ |
PyErr_SetString(PyExc_Exception, ERROBJ); |
return NULL; |
}*/ |
return PyString_FromString(Carrier->doc->ActPage->Items.at(i)->AnName); |
} |
/* 03/29/2004 - pynone |
*/ |
PyObject *scribus_newimage(PyObject *self, PyObject* args) |
{ |
double x, y, b, h; |
char *Name = ""; |
if (!PyArg_ParseTuple(args, "dddd|s", &x, &y, &b, &h, &Name)) |
{ |
PyErr_SetString(PyExc_Exception, ERRPARAM + QString("CreateImage(x, y, w, h [, objectname])")); |
return NULL; |
} |
if (!Carrier->HaveDoc) |
{ |
Py_INCREF(Py_None); |
66,20 → 82,27 |
} |
int i = Carrier->doc->ActPage->PaintPict(ValueToPoint(x), ValueToPoint(y), ValueToPoint(b), ValueToPoint(h)); |
Carrier->doc->ActPage->SetRectFrame(Carrier->doc->ActPage->Items.at(i)); |
if (Name != "") |
Carrier->doc->ActPage->Items.at(i)->AnName = QString(Name); |
if (GetUniqueItem(QString(Name)) == NULL) |
if (Name != "") |
Carrier->doc->ActPage->Items.at(i)->AnName = QString(Name); |
/* else |
{ |
PyErr_SetString(PyExc_Exception, ERROBJ); |
return NULL; |
}*/ |
return PyString_FromString(Carrier->doc->ActPage->Items.at(i)->AnName); |
} |
/* 03/31/2004 pynone |
*/ |
PyObject *scribus_newtext(PyObject *self, PyObject* args) |
{ |
double x, y, b, h; |
char *Name = ""; |
if (!PyArg_ParseTuple(args, "dddd|s", &x, &y, &b, &h, &Name)) |
{ |
PyErr_SetString(PyExc_Exception, ERRPARAM + QString("CreateText(x, y, w, h [, objectname])")); |
return NULL; |
} |
if (!Carrier->HaveDoc) |
{ |
Py_INCREF(Py_None); |
89,20 → 112,29 |
ValueToPoint(b), ValueToPoint(h), |
Carrier->doc->Dwidth, Carrier->doc->DpenText); |
Carrier->doc->ActPage->SetRectFrame(Carrier->doc->ActPage->Items.at(i)); |
if (Name != "") |
Carrier->doc->ActPage->Items.at(i)->AnName = QString(Name); |
if (GetUniqueItem(QString(Name)) == NULL) |
{ |
if (Name != "") |
Carrier->doc->ActPage->Items.at(i)->AnName = QString(Name); |
} |
/* else |
{ |
PyErr_SetString(PyExc_Exception, ERROBJ); |
return NULL; |
}*/ |
return PyString_FromString(Carrier->doc->ActPage->Items.at(i)->AnName); |
} |
/* 03/29/2004 pynone |
*/ |
PyObject *scribus_newline(PyObject *self, PyObject* args) |
{ |
double x, y, b, h; |
char *Name = ""; |
if (!PyArg_ParseTuple(args, "dddd|s", &x, &y, &b, &h, &Name)) |
{ |
PyErr_SetString(PyExc_Exception, ERRPARAM + QString("CreateLine(x, y, w, h [, objectname])")); |
return NULL; |
} |
if (!Carrier->HaveDoc) |
{ |
Py_INCREF(Py_None); |
132,20 → 164,27 |
} |
Carrier->doc->ActPage->SizeItem(it->PoLine.WidthHeight().x(), it->PoLine.WidthHeight().y(), i, false, false); |
Carrier->doc->ActPage->AdjustItemSize(it); |
if (Name != "") |
it->AnName = QString(Name); |
if (GetUniqueItem(QString(Name)) == NULL) |
if (Name != "") |
it->AnName = QString(Name); |
/* else |
{ |
PyErr_SetString(PyExc_Exception, ERROBJ); |
return NULL; |
}*/ |
return PyString_FromString(it->AnName); |
} |
/* 03/31/2004 pynone |
*/ |
PyObject *scribus_polyline(PyObject *self, PyObject* args) |
{ |
char *Name = ""; |
PyObject *il; |
if ((!PyArg_ParseTuple(args, "O|s", &il, &Name)) || (!PyList_Check(il))) |
{ |
PyErr_SetString(PyExc_Exception, ERRPARAM + QString("CreatePolyLine(pointlist [, objectname])")); |
return NULL; |
} |
if (!Carrier->HaveDoc) |
{ |
Py_INCREF(Py_None); |
196,20 → 235,27 |
} |
Carrier->doc->ActPage->SizeItem(it->PoLine.WidthHeight().x(), it->PoLine.WidthHeight().y(), ic, false, false); |
Carrier->doc->ActPage->AdjustItemSize(it); |
if (Name != "") |
it->AnName = QString(Name); |
if (GetUniqueItem(QString(Name)) == NULL) |
if (Name != "") |
it->AnName = QString(Name); |
/* else |
{ |
PyErr_SetString(PyExc_Exception, ERROBJ); |
return NULL; |
}*/ |
return PyString_FromString(it->AnName); |
} |
/* 03/31/2004 pynone |
*/ |
PyObject *scribus_polygon(PyObject *self, PyObject* args) |
{ |
char *Name = ""; |
PyObject *il; |
if ((!PyArg_ParseTuple(args, "O|s", &il, &Name)) || (!PyList_Check(il))) |
{ |
PyErr_SetString(PyExc_Exception, ERRPARAM + QString("CreatePolygon(pointlist [, objectname])")); |
return NULL; |
} |
if (!Carrier->HaveDoc) |
{ |
Py_INCREF(Py_None); |
265,8 → 311,14 |
} |
Carrier->doc->ActPage->SizeItem(it->PoLine.WidthHeight().x(), it->PoLine.WidthHeight().y(), ic, false, false); |
Carrier->doc->ActPage->AdjustItemSize(it); |
if (Name != "") |
it->AnName = QString(Name); |
if (GetUniqueItem(QString(Name)) == NULL) |
if (Name != "") |
it->AnName = QString(Name); |
/* else |
{ |
PyErr_SetString(PyExc_Exception, ERROBJ); |
return NULL; |
}*/ |
return PyString_FromString(it->AnName); |
} |
275,7 → 327,10 |
char *Name = ""; |
PyObject *il; |
if ((!PyArg_ParseTuple(args, "O|s", &il, &Name)) || (!PyList_Check(il))) |
{ |
PyErr_SetString(PyExc_Exception, ERRPARAM + QString("CreateBezierLine(pointlist [, objectname])")); |
return NULL; |
} |
if (!Carrier->HaveDoc) |
return PyString_FromString(""); |
int len = PyList_Size(il); |
337,8 → 392,14 |
} |
Carrier->doc->ActPage->SizeItem(it->PoLine.WidthHeight().x(), it->PoLine.WidthHeight().y(), ic, false, false); |
Carrier->doc->ActPage->AdjustItemSize(it); |
if (Name != "") |
it->AnName = QString(Name); |
if (GetUniqueItem(QString(Name)) == NULL) |
if (Name != "") |
it->AnName = QString(Name); |
/* else |
{ |
PyErr_SetString(PyExc_Exception, ERROBJ); |
return NULL; |
}*/ |
return PyString_FromString(it->AnName); |
} |
352,7 → 413,10 |
char *TextB = ""; |
char *PolyB = ""; |
if (!PyArg_ParseTuple(args, "ddss|s", &x, &y, &TextB, &PolyB, &Name)) |
{ |
PyErr_SetString(PyExc_Exception, ERRPARAM + QString("CreatePathText(x, y, textbox, beziercurve [, objectname])")); |
return NULL; |
} |
if ((!Carrier->HaveDoc) || ((TextB == "") || (PolyB == ""))) |
{ |
Py_INCREF(Py_None); |
372,8 → 436,14 |
PageItem *it = Carrier->doc->ActPage->Items.at(i); |
Carrier->doc->ActPage->ToPathText(); |
Carrier->doc->ActPage->MoveItem(ValueToPoint(x) - it->Xpos, ValueToPoint(y) - it->Ypos, it); |
if (Name != "") |
it->AnName = QString(Name); |
if (GetUniqueItem(QString(Name)) == NULL) |
if (Name != "") |
it->AnName = QString(Name); |
/* else |
{ |
PyErr_SetString(PyExc_Exception, ERROBJ); |
return NULL; |
}*/ |
return PyString_FromString(it->AnName); |
} |
384,25 → 454,27 |
{ |
char *Name = ""; |
if (!PyArg_ParseTuple(args, "|s", &Name)) |
{ |
PyErr_SetString(PyExc_Exception, ERRPARAM + QString("DeleteObject([objectname])")); |
return NULL; |
} |
Py_INCREF(Py_None); |
if (!Carrier->HaveDoc) |
return Py_None; |
if (Name != "") |
PageItem *i = GetUniqueItem(QString(Name)); |
if (Name != NULL) |
{ |
Carrier->doc->ActPage->SelItem.clear(); |
int i = GetItem(QString(Name)); |
if (i != -1) |
Carrier->doc->ActPage->SelItem.append(Carrier->doc->ActPage->Items.at(i)); |
else |
{ |
PyErr_SetString(PyExc_Exception, |
QObject::tr("Oook! You're trying to erase an object doesn't exist!")); |
Py_DECREF(Py_None); |
return NULL; |
} |
i->OwnPage->SelItem.clear(); |
i->OwnPage->SelItem.append(i); |
i->OwnPage->DeleteItem(); |
} |
Carrier->doc->ActPage->DeleteItem(); |
else |
{ |
PyErr_SetString(PyExc_Exception, |
QObject::tr("Oook! You're trying to erase an object doesn't exist!")); |
Py_DECREF(Py_None); |
return NULL; |
} |
return Py_None; |
} |
411,36 → 483,28 |
*/ |
PyObject *scribus_textflow(PyObject *self, PyObject* args) |
{ |
char* name; |
int id, state = -1; |
char *name = ""; |
int state = -1; |
if (!PyArg_ParseTuple(args, "s|i", &name, &state)) |
{ |
PyErr_SetString(PyExc_Exception, ERRPARAM + QString("TextFlowsAroundFrame(objectname [,state])")); |
return NULL; |
} |
Py_INCREF(Py_None); |
if (!Carrier->HaveDoc) |
return Py_None; |
id = GetItem(QString(name)); |
if (id == -1) |
PageItem *i = GetUniqueItem(QString(name)); |
if (i == NULL) |
{ |
PyErr_SetString(PyExc_Exception, |
QObject::tr("Oook! An object you're trying to textflow doesn't exist!")); |
PyErr_SetString(PyExc_Exception, QObject::tr("Oook! An object you're trying to textflow doesn't exist!")); |
Py_DECREF(Py_None); |
return NULL; |
} |
if (state == -1) |
{ |
Carrier->doc->ActPage->Items.at(id)->Textflow = |
!Carrier->doc->ActPage->Items.at(id)->Textflow; |
} |
i->Textflow = !i->Textflow; |
else |
{ |
state |
? Carrier->doc->ActPage->Items.at(id)->Textflow = true |
: Carrier->doc->ActPage->Items.at(id)->Textflow = false; |
} // if state null |
state ? i->Textflow = true : i->Textflow = false; |
Carrier->view->DrawNew(); |
Carrier->slotDocCh(true); |
return Py_None; |
449,10 → 513,13 |
PyObject *scribus_objectexists(PyObject *self, PyObject* args) |
{ |
char* name; |
char* name = ""; |
if (!PyArg_ParseTuple(args, "s", &name)) |
if (!PyArg_ParseTuple(args, "|s", &name)) |
{ |
PyErr_SetString(PyExc_Exception, ERRPARAM + QString("ObjectExists([objectname])")); |
return NULL; |
} |
if (!Carrier->HaveDoc) |
{ |
Py_INCREF(Py_None); |
/trunk/Scribus/scribus/plugins/scriptplugin/cmdpage.cpp |
---|
6,7 → 6,10 |
PyObject *scribus_actualpage(PyObject *self, PyObject* args) |
{ |
if (!PyArg_ParseTuple(args, "")) |
{ |
PyErr_SetString(PyExc_Exception, ERRPARAM + QString("CurrentPage()")); |
return NULL; |
} |
if (!Carrier->HaveDoc) |
return PyInt_FromLong(0L); |
return PyInt_FromLong(static_cast<long>(Carrier->doc->ActPage->PageNr + 1)); |
15,7 → 18,10 |
PyObject *scribus_redraw(PyObject *self, PyObject* args) |
{ |
if (!PyArg_ParseTuple(args, "")) |
{ |
PyErr_SetString(PyExc_Exception, ERRPARAM + QString("RedrawAll()")); |
return NULL; |
} |
Py_INCREF(Py_None); |
if (!Carrier->HaveDoc) |
return Py_None; |
27,7 → 33,10 |
{ |
char *Name; |
if (!PyArg_ParseTuple(args, "s", &Name)) |
{ |
PyErr_SetString(PyExc_Exception, ERRPARAM + QString("SavePageAsEPS(filename)")); |
return NULL; |
} |
if (!Carrier->HaveDoc) |
return PyInt_FromLong(0L); |
bool ret = Carrier->DoSaveAsEps(QString(Name)); |
39,7 → 48,10 |
{ |
int e; |
if (!PyArg_ParseTuple(args, "i", &e)) |
{ |
PyErr_SetString(PyExc_Exception, ERRPARAM + QString("DeletePage(pagenumber)")); |
return NULL; |
} |
Py_INCREF(Py_None); |
if (!Carrier->HaveDoc) |
return Py_None; |
55,7 → 67,10 |
{ |
int e; |
if (!PyArg_ParseTuple(args, "i", &e)) |
{ |
PyErr_SetString(PyExc_Exception, ERRPARAM + QString("GotoPage(pagenumber)")); |
return NULL; |
} |
Py_INCREF(Py_None); |
if (!Carrier->HaveDoc) |
return Py_None; |
72,7 → 87,10 |
int e; |
char *name = "Normal"; |
if (!PyArg_ParseTuple(args, "i|s", &e, &name)) |
{ |
PyErr_SetString(PyExc_Exception, ERRPARAM + QString("NewPage(pagenumber [, pagename])")); |
return NULL; |
} |
Py_INCREF(Py_None); |
if (!Carrier->HaveDoc) |
return Py_None; |
92,7 → 110,10 |
PyObject *scribus_pagecount(PyObject *self, PyObject* args) |
{ |
if (!PyArg_ParseTuple(args, "")) |
{ |
PyErr_SetString(PyExc_Exception, ERRPARAM + QString("PageCount()")); |
return NULL; |
} |
if (!Carrier->HaveDoc) |
return PyInt_FromLong(0L); |
return PyInt_FromLong(static_cast<long>(Carrier->view->Pages.count())); |
100,14 → 121,16 |
PyObject *scribus_pagedimension(PyObject *self, PyObject *args) |
{ |
if (!PyArg_ParseTuple(args, "")) { |
if (!PyArg_ParseTuple(args, "")) |
{ |
PyErr_SetString(PyExc_Exception, ERRPARAM + QString("PageDimension()")); |
return NULL; |
} |
if (!Carrier->HaveDoc) { |
Py_INCREF(Py_None); |
if (!Carrier->HaveDoc) |
{ |
Py_INCREF(Py_None); |
return Py_None; |
} |
PyObject *t; |
t = Py_BuildValue( |
"(dd)", |
120,7 → 143,10 |
PyObject *scribus_getpageitems(PyObject *self, PyObject* args) |
{ |
if (!PyArg_ParseTuple(args, "")) |
{ |
PyErr_SetString(PyExc_Exception, ERRPARAM + QString("GetPageItems()")); |
return NULL; |
} |
if ((!Carrier->HaveDoc) || (Carrier->doc->ActPage->Items.count() == 0)) |
return Py_BuildValue((char*)"[]"); |
PyObject *l = PyList_New(Carrier->doc->ActPage->Items.count()); |
131,7 → 157,7 |
Carrier->doc->ActPage->Items.at(i)->AnName.ascii(), |
Carrier->doc->ActPage->Items.at(i)->PType, |
Carrier->doc->ActPage->Items.at(i)->ItemNr |
); |
); |
PyList_SetItem(l, i, row); |
} // for |
return l; |
/trunk/Scribus/scribus/plugins/scriptplugin/cmdutil.cpp |
---|
135,9 → 135,13 |
} |
} |
/* 04/07/10 returns selection if is not name specified pv */ |
PageItem* GetUniqueItem(QString name) |
{ |
if (name.length()==0) |
if (Carrier->doc->ActPage->SelItem.count() != 0) |
return Carrier->doc->ActPage->SelItem.at(0); |
if (name.length()==0) // in the case of no selection and "" |
return NULL; |
for (uint i = 0; i<Carrier->view->Pages.count(); i++) |
{ |
149,4 → 153,3 |
} // for pages |
return NULL; |
} |
/trunk/Scribus/scribus/plugins/scriptplugin/cmdgetprop.cpp |
---|
3,42 → 3,47 |
#include "cmdutil.h" |
#include "cmdvar.h" |
/* |
07/10/2004 exceptions raised when wrong params called, most of the procs. are |
handling the all pages - not just actual - now. pv. |
*/ |
PyObject *scribus_getfillcolor(PyObject *self, PyObject* args) |
{ |
char *Name = ""; |
int i; |
if (!PyArg_ParseTuple(args, "|s", &Name)) |
{ |
PyErr_SetString(PyExc_Exception, ERRPARAM + QString("GetFillColor([objectname])")); |
return NULL; |
} |
if (!Carrier->HaveDoc) |
return PyString_FromString(""); |
i = GetItem(QString(Name)); |
return i != -1 ? PyString_FromString(Carrier->doc->ActPage->Items.at(i)->Pcolor) : PyString_FromString(""); |
PageItem *i = GetUniqueItem(QString(Name)); |
return i != NULL ? PyString_FromString(i->Pcolor) : PyString_FromString(""); |
} |
PyObject *scribus_getlinecolor(PyObject *self, PyObject* args) |
{ |
char *Name = ""; |
int i; |
PageItem *it; |
if (!PyArg_ParseTuple(args, "|s", &Name)) |
{ |
PyErr_SetString(PyExc_Exception, ERRPARAM + QString("GetLineColor([objectname])")); |
return NULL; |
} |
if (!Carrier->HaveDoc) |
return PyString_FromString(""); |
i = GetItem(QString(Name)); |
if (i != -1) |
it = GetUniqueItem(QString(Name)); |
if ((it != NULL) && (it->HasSel) && ((it->PType == 4) || (it->PType == 8))) |
{ |
for (uint b = 0; b < it->Ptext.count(); ++b) |
{ |
it = Carrier->doc->ActPage->Items.at(i); |
if ((it->HasSel) && ((it->PType == 4) || (it->PType == 8))) |
{ |
for (uint b = 0; b < it->Ptext.count(); ++b) |
{ |
if (it->Ptext.at(b)->cselect) |
return PyString_FromString(it->Ptext.at(b)->ccolor); |
} |
} |
else |
return PyString_FromString(it->Pcolor2); |
if (it->Ptext.at(b)->cselect) |
return PyString_FromString(it->Ptext.at(b)->ccolor); |
} |
} |
else |
return PyString_FromString(it->Pcolor2); |
return PyString_FromString(""); |
} |
45,40 → 50,39 |
PyObject *scribus_getlinewidth(PyObject *self, PyObject* args) |
{ |
char *Name = ""; |
int i; |
if (!PyArg_ParseTuple(args, "|s", &Name)) |
{ |
PyErr_SetString(PyExc_Exception, ERRPARAM + QString("GetLineWidth([objectname])")); |
return NULL; |
} |
if (!Carrier->HaveDoc) |
return PyFloat_FromDouble(0.0); |
i = GetItem(QString(Name)); |
return i != -1 ? PyFloat_FromDouble(static_cast<double>(Carrier->doc->ActPage->Items.at(i)->Pwidth)) : |
PyFloat_FromDouble(0.0); |
PageItem *i = GetUniqueItem(QString(Name)); |
return i != NULL ? PyFloat_FromDouble(static_cast<double>(i->Pwidth)) : PyFloat_FromDouble(0.0); |
} |
PyObject *scribus_getlineshade(PyObject *self, PyObject* args) |
{ |
char *Name = ""; |
int i; |
PageItem *it; |
if (!PyArg_ParseTuple(args, "|s", &Name)) |
{ |
PyErr_SetString(PyExc_Exception, ERRPARAM + QString("GetLineShade([objectname])")); |
return NULL; |
} |
if (!Carrier->HaveDoc) |
return PyInt_FromLong(0L); |
i = GetItem(QString(Name)); |
if (i != -1) |
it = GetUniqueItem(QString(Name)); |
if ((it != NULL) && (it->HasSel) && ((it->PType == 4) || (it->PType == 8))) |
{ |
for (uint b = 0; b < it->Ptext.count(); ++b) |
{ |
it = Carrier->doc->ActPage->Items.at(i); |
if ((it->HasSel) && ((it->PType == 4) || (it->PType == 8))) |
{ |
for (uint b = 0; b < it->Ptext.count(); ++b) |
{ |
if (it->Ptext.at(b)->cselect) |
return PyInt_FromLong(static_cast<long>(it->Ptext.at(b)->cshade)); |
} |
} |
else |
return PyInt_FromLong(static_cast<long>(it->Shade2)); |
if (it->Ptext.at(b)->cselect) |
return PyInt_FromLong(static_cast<long>(it->Ptext.at(b)->cshade)); |
} |
} |
else |
return PyInt_FromLong(static_cast<long>(it->Shade2)); |
return PyInt_FromLong(0L); |
} |
85,145 → 89,141 |
PyObject *scribus_getlinejoin(PyObject *self, PyObject* args) |
{ |
char *Name = ""; |
int i; |
if (!PyArg_ParseTuple(args, "|s", &Name)) |
{ |
PyErr_SetString(PyExc_Exception, ERRPARAM + QString("GetLineJoin([objectname])")); |
return NULL; |
} |
if (!Carrier->HaveDoc) |
return PyInt_FromLong(0L); |
i = GetItem(QString(Name)); |
return i != 1 ? PyInt_FromLong(static_cast<long>(Carrier->doc->ActPage->Items.at(i)->PLineJoin)) : |
PyInt_FromLong(0L); |
PageItem *i = GetUniqueItem(QString(Name)); |
return i != NULL ? PyInt_FromLong(static_cast<long>(i->PLineJoin)) : PyInt_FromLong(0L); |
} |
PyObject *scribus_getlineend(PyObject *self, PyObject* args) |
{ |
char *Name = ""; |
int i; |
if (!PyArg_ParseTuple(args, "|s", &Name)) |
{ |
PyErr_SetString(PyExc_Exception, ERRPARAM + QString("GetLineEnd([objectname])")); |
return NULL; |
} |
if (!Carrier->HaveDoc) |
return PyInt_FromLong(0L); |
i = GetItem(QString(Name)); |
return i != -1 ? PyInt_FromLong(static_cast<long>(Carrier->doc->ActPage->Items.at(i)->PLineEnd)) : |
PyInt_FromLong(0L); |
PageItem *i = GetUniqueItem(QString(Name)); |
return i != NULL ? PyInt_FromLong(static_cast<long>(i->PLineEnd)) : PyInt_FromLong(0L); |
} |
PyObject *scribus_getlinestyle(PyObject *self, PyObject* args) |
{ |
char *Name = ""; |
int i; |
if (!PyArg_ParseTuple(args, "|s", &Name)) |
{ |
PyErr_SetString(PyExc_Exception, ERRPARAM + QString("GetLineStyle([objectname])")); |
return NULL; |
} |
if (!Carrier->HaveDoc) |
return PyInt_FromLong(0L); |
i = GetItem(QString(Name)); |
return i != -1 ? PyInt_FromLong(static_cast<long>(Carrier->doc->ActPage->Items.at(i)->PLineArt)) : |
PyInt_FromLong(0L); |
PageItem *i = GetUniqueItem(QString(Name)); |
return i != NULL ? PyInt_FromLong(static_cast<long>(i->PLineArt)) : PyInt_FromLong(0L); |
} |
PyObject *scribus_getfillshade(PyObject *self, PyObject* args) |
{ |
char *Name = ""; |
int i; |
if (!PyArg_ParseTuple(args, "|s", &Name)) |
{ |
PyErr_SetString(PyExc_Exception, ERRPARAM + QString("GetFillShade([objectname])")); |
return NULL; |
} |
if (!Carrier->HaveDoc) |
return PyInt_FromLong(0L); |
i = GetItem(QString(Name)); |
return i != -1 ? PyInt_FromLong(static_cast<long>(Carrier->doc->ActPage->Items.at(i)->Shade)) : |
PyInt_FromLong(0L); |
PageItem *i = GetUniqueItem(QString(Name)); |
return i != NULL ? PyInt_FromLong(static_cast<long>(i->Shade)) : PyInt_FromLong(0L); |
} |
PyObject *scribus_getcornerrad(PyObject *self, PyObject* args) |
{ |
char *Name = ""; |
int i; |
if (!PyArg_ParseTuple(args, "|s", &Name)) |
{ |
PyErr_SetString(PyExc_Exception, ERRPARAM + QString("GetCornerRadius([objectname])")); |
return NULL; |
} |
if (!Carrier->HaveDoc) |
return PyInt_FromLong(0L); |
i = GetItem(QString(Name)); |
return i != -1 ? PyInt_FromLong(static_cast<long>(Carrier->doc->ActPage->Items.at(i)->RadRect)) : |
PyInt_FromLong(0L); |
PageItem *i = GetUniqueItem(QString(Name)); |
return i != NULL ? PyInt_FromLong(static_cast<long>(i->RadRect)) : PyInt_FromLong(0L); |
} |
PyObject *scribus_getimgscale(PyObject *self, PyObject* args) |
{ |
char *Name = ""; |
int i; |
if (!PyArg_ParseTuple(args, "|s", &Name)) |
{ |
PyErr_SetString(PyExc_Exception, ERRPARAM + QString("GetImageScale([objectname])")); |
return NULL; |
} |
if (!Carrier->HaveDoc) |
return Py_BuildValue("(ff)", 1.0, 1.0); |
i = GetItem(QString(Name)); |
if (i != -1) |
{ |
PageItem *b = Carrier->doc->ActPage->Items.at(i); |
return Py_BuildValue("(ff)", b->LocalScX, b->LocalScY); |
} |
else |
return Py_BuildValue("(ff)", 1.0, 1.0); |
PageItem *i = GetUniqueItem(QString(Name)); |
return i != NULL ? Py_BuildValue("(ff)", i->LocalScX, i->LocalScY) : Py_BuildValue("(ff)", 1.0, 1.0); |
} |
PyObject *scribus_getimgname(PyObject *self, PyObject* args) |
{ |
char *Name = ""; |
int i; |
if (!PyArg_ParseTuple(args, "|s", &Name)) |
{ |
PyErr_SetString(PyExc_Exception, ERRPARAM + QString("GetImageFile([objectname])")); |
return NULL; |
} |
if (!Carrier->HaveDoc) |
return PyString_FromString(""); |
i = GetItem(QString(Name)); |
return i != -1 ? PyString_FromString(Carrier->doc->ActPage->Items.at(i)->Pfile) : PyString_FromString(""); |
PageItem *i = GetUniqueItem(QString(Name)); |
return i != NULL ? PyString_FromString(i->Pfile) : PyString_FromString(""); |
} |
PyObject *scribus_getposi(PyObject *self, PyObject* args) |
{ |
char *Name = ""; |
int i; |
if (!PyArg_ParseTuple(args, "|s", &Name)) |
{ |
PyErr_SetString(PyExc_Exception, ERRPARAM + QString("GetPosition([objectname])")); |
return NULL; |
} |
if (!Carrier->HaveDoc) |
return Py_BuildValue("(ff)", 0.0, 0.0); |
i = GetItem(QString(Name)); |
if (i != -1) |
{ |
PageItem *it = Carrier->doc->ActPage->Items.at(i); |
return Py_BuildValue("(ff)", PointToValue(it->Xpos), PointToValue(it->Ypos)); |
} |
else |
return Py_BuildValue("(ff)", 0.0, 0.0); |
PageItem *i = GetUniqueItem(QString(Name)); |
return (i != NULL) ? Py_BuildValue("(ff)", PointToValue(i->Xpos), PointToValue(i->Ypos)) : Py_BuildValue("(ff)", 0.0, 0.0); |
} |
PyObject *scribus_getsize(PyObject *self, PyObject* args) |
{ |
char *Name = ""; |
int i; |
if (!PyArg_ParseTuple(args, "|s", &Name)) |
{ |
PyErr_SetString(PyExc_Exception, ERRPARAM + QString("GetSize([objectname])")); |
return NULL; |
} |
if (!Carrier->HaveDoc) |
return Py_BuildValue("(ff)", 0.0, 0.0); |
i = GetItem(QString(Name)); |
if (i != -1) |
{ |
PageItem *it = Carrier->doc->ActPage->Items.at(i); |
return Py_BuildValue("(ff)", PointToValue(it->Width), PointToValue(it->Height)); |
} |
else |
return Py_BuildValue("(ff)", 0.0, 0.0); |
PageItem *i = GetUniqueItem(QString(Name)); |
return (i != NULL) ? Py_BuildValue("(ff)", PointToValue(i->Width), PointToValue(i->Height)) : Py_BuildValue("(ff)", 0.0, 0.0); |
} |
PyObject *scribus_getrotation(PyObject *self, PyObject* args) |
{ |
char *Name = ""; |
int i; |
if (!PyArg_ParseTuple(args, "|s", &Name)) |
{ |
PyErr_SetString(PyExc_Exception, ERRPARAM + QString("GetRotation([objectname])")); |
return NULL; |
} |
if (!Carrier->HaveDoc) |
return PyFloat_FromDouble(0.0); |
i = GetItem(QString(Name)); |
return i != -1 ? PyFloat_FromDouble(static_cast<double>(Carrier->doc->ActPage->Items.at(i)->Rot * -1)) : |
PyFloat_FromDouble(0.0); |
PageItem *i = GetUniqueItem(QString(Name)); |
return i != NULL ? PyFloat_FromDouble(static_cast<double>(i->Rot * -1)) : PyFloat_FromDouble(0.0); |
} |
PyObject *scribus_getallobj(PyObject *self, PyObject* args) |
233,7 → 233,10 |
uint counter = 0; |
uint counter2 = 0; |
if (!PyArg_ParseTuple(args, "|i", &typ)) |
{ |
PyErr_SetString(PyExc_Exception, ERRPARAM + QString("GetAllObjects([objecttype])")); |
return NULL; |
} |
if (Carrier->HaveDoc) |
{ |
if (typ != -1) |
/trunk/Scribus/scribus/plugins/scriptplugin/cmdtext.cpp |
---|
7,21 → 7,20 |
{ |
char *Name = ""; |
if (!PyArg_ParseTuple(args, "|s", &Name)) |
{ |
PyErr_SetString(PyExc_Exception, ERRPARAM + QString("GetFontSize([objectname])")); |
return NULL; |
} |
if (!Carrier->HaveDoc) |
return PyFloat_FromDouble(0.0); |
int i = GetItem(QString(Name)); |
PageItem *it; |
if (i != -1) |
PageItem *it = GetUniqueItem(QString(Name)); |
if (it != NULL) |
{ |
it = Carrier->doc->ActPage->Items.at(i); |
if (it->HasSel) |
{ |
for (uint b = 0; b < it->Ptext.count(); b++) |
{ |
if (it->Ptext.at(b)->cselect) |
return PyFloat_FromDouble(static_cast<double>(it->Ptext.at(b)->csize / 10.0)); |
} |
} |
else |
return PyFloat_FromDouble(static_cast<long>(it->ISize / 10.0)); |
33,21 → 32,20 |
{ |
char *Name = ""; |
if (!PyArg_ParseTuple(args, "|s", &Name)) |
{ |
PyErr_SetString(PyExc_Exception, ERRPARAM + QString("GetFont([objectname])")); |
return NULL; |
} |
if (!Carrier->HaveDoc) |
return PyString_FromString(""); |
int i = GetItem(QString(Name)); |
PageItem *it; |
if (i != -1) |
PageItem *it = GetUniqueItem(QString(Name)); |
if (it != NULL) |
{ |
it = Carrier->doc->ActPage->Items.at(i); |
if (it->HasSel) |
{ |
for (uint b = 0; b < it->Ptext.count(); b++) |
{ |
if (it->Ptext.at(b)->cselect) |
return PyString_FromString(it->Ptext.at(b)->cfont); |
} |
} |
else |
return PyString_FromString(it->IFont); |
59,13 → 57,14 |
{ |
char *Name = ""; |
if (!PyArg_ParseTuple(args, "|s", &Name)) |
{ |
PyErr_SetString(PyExc_Exception, ERRPARAM + QString("GetTextLength([objectname])")); |
return NULL; |
} |
if (!Carrier->HaveDoc) |
return PyInt_FromLong(0L); |
int i = GetItem(QString(Name)); |
return i != -1 ? |
PyInt_FromLong(static_cast<long>(Carrier->doc->ActPage->Items.at(i)->Ptext.count())) : |
PyInt_FromLong(0L); |
PageItem *i = GetUniqueItem(QString(Name)); |
return i != NULL ? PyInt_FromLong(static_cast<long>(i->Ptext.count())) : PyInt_FromLong(0L); |
} |
PyObject *scribus_getcolumns(PyObject *self, PyObject* args) |
72,13 → 71,14 |
{ |
char *Name = ""; |
if (!PyArg_ParseTuple(args, "|s", &Name)) |
{ |
PyErr_SetString(PyExc_Exception, ERRPARAM + QString("GetColumns([objectname])")); |
return NULL; |
} |
if (!Carrier->HaveDoc) |
return PyInt_FromLong(0L); |
int i = GetItem(QString(Name)); |
return i != -1 ? |
PyInt_FromLong(static_cast<long>(Carrier->doc->ActPage->Items.at(i)->Cols)) : |
PyInt_FromLong(0L); |
PageItem *i = GetUniqueItem(QString(Name)); |
return i != NULL ? PyInt_FromLong(static_cast<long>(i->Cols)) : PyInt_FromLong(0L); |
} |
PyObject *scribus_getlinespace(PyObject *self, PyObject* args) |
85,13 → 85,14 |
{ |
char *Name = ""; |
if (!PyArg_ParseTuple(args, "|s", &Name)) |
{ |
PyErr_SetString(PyExc_Exception, ERRPARAM + QString("GetLineSpacing([objectname])")); |
return NULL; |
} |
if (!Carrier->HaveDoc) |
return PyFloat_FromDouble(0.0); |
int i = GetItem(QString(Name)); |
return i != -1 ? |
PyFloat_FromDouble(static_cast<double>(Carrier->doc->ActPage->Items.at(i)->LineSp)) : |
PyFloat_FromDouble(0.0); |
PageItem *i = GetUniqueItem(QString(Name)); |
return i != NULL ? PyFloat_FromDouble(static_cast<double>(i->LineSp)) : PyFloat_FromDouble(0.0); |
} |
PyObject *scribus_getcolumngap(PyObject *self, PyObject* args) |
98,13 → 99,14 |
{ |
char *Name = ""; |
if (!PyArg_ParseTuple(args, "|s", &Name)) |
{ |
PyErr_SetString(PyExc_Exception, ERRPARAM + QString("GetColumnGap([objectname])")); |
return NULL; |
} |
if (!Carrier->HaveDoc) |
return PyFloat_FromDouble(0.0); |
int i = GetItem(QString(Name)); |
return i != -1 ? |
PyFloat_FromDouble(static_cast<double>(Carrier->doc->ActPage->Items.at(i)->ColGap)) : |
PyFloat_FromDouble(0.0); |
PageItem *i = GetUniqueItem(QString(Name)); |
return i != NULL ? PyFloat_FromDouble(static_cast<double>(i->ColGap)) : PyFloat_FromDouble(0.0); |
} |
PyObject *scribus_getframetext(PyObject *self, PyObject* args) |
111,15 → 113,16 |
{ |
char *Name = ""; |
if (!PyArg_ParseTuple(args, "|s", &Name)) |
{ |
PyErr_SetString(PyExc_Exception, ERRPARAM + QString("GetText([objectname])")); |
return NULL; |
} |
if (!Carrier->HaveDoc) |
return PyString_FromString(""); |
int i = GetItem(QString(Name)); |
QString text = ""; |
PageItem *it; |
if (i != -1) |
PageItem *it = GetUniqueItem(QString(Name)); |
if (it != NULL) |
{ |
it = Carrier->doc->ActPage->Items.at(i); |
for (uint a = 0; a < it->Ptext.count(); a++) |
{ |
if (it->HasSel) |
128,8 → 131,11 |
text += it->Ptext.at(a)->ch; |
} |
else |
{ |
text += it->Ptext.at(a)->ch; |
} |
} |
qDebug(text); |
return PyString_FromString(text); |
} |
else |
140,21 → 146,22 |
{ |
char *Name = ""; |
if (!PyArg_ParseTuple(args, "|s", &Name)) |
{ |
PyErr_SetString(PyExc_Exception, ERRPARAM + QString("GetAllText([objectname])")); |
return NULL; |
} |
if (!Carrier->HaveDoc) |
return PyString_FromString(""); |
int i = GetItem(QString(Name)); |
QString text = ""; |
PageItem *it; |
PageItem *it = GetUniqueItem(QString(Name)); |
PageItem *is; |
if (i != -1) |
if (it != NULL) |
{ |
it = Carrier->doc->ActPage->Items.at(i); |
while (it->BackBox != 0) |
{ |
is = Carrier->doc->ActPage->Items.at(it->BackBox->ItemNr); |
is = GetUniqueItem(it->BackBox->AnName); |
it = is; |
} |
} // while |
for (uint a = 0; a < it->Ptext.count(); a++) |
{ |
if (it->HasSel) |
163,11 → 170,13 |
text += it->Ptext.at(a)->ch; |
} |
else |
{ |
text += it->Ptext.at(a)->ch; |
} |
} |
} // for |
while (it->NextBox != 0) |
{ |
is = Carrier->doc->ActPage->Items.at(it->NextBox->ItemNr); |
is = GetUniqueItem(it->NextBox->AnName); |
it = is; |
for (uint a = 0; a < it->Ptext.count(); a++) |
{ |
177,9 → 186,11 |
text += it->Ptext.at(a)->ch; |
} |
else |
{ |
text += it->Ptext.at(a)->ch; |
} |
} |
} |
} // for |
} // while |
return PyString_FromString(text); |
} |
else |
192,16 → 203,17 |
char *Text; |
int i; |
if (!PyArg_ParseTuple(args, "s|s", &Text, &Name)) |
{ |
PyErr_SetString(PyExc_Exception, ERRPARAM + QString("SetTExt(text [, objectname])")); |
return NULL; |
} |
Py_INCREF(Py_None); |
if (!Carrier->HaveDoc) |
return Py_None; |
i = GetItem(QString(Name)); |
PageItem *it; |
PageItem *it = GetUniqueItem(QString(Name)); |
QString Daten = QString(Text); |
if (i != -1) |
if (it != NULL) |
{ |
it = Carrier->doc->ActPage->Items.at(i); |
if (it->NextBox != 0) |
{ |
PageItem *nb = it->NextBox; |
249,16 → 261,17 |
char *Text; |
int pos; |
if (!PyArg_ParseTuple(args, "si|s", &Text, &pos, &Name)) |
{ |
PyErr_SetString(PyExc_Exception, ERRPARAM + QString("InsertText(text, position [, objectname])")); |
return NULL; |
} |
Py_INCREF(Py_None); |
if (!Carrier->HaveDoc) |
return Py_None; |
int i = GetItem(QString(Name)); |
PageItem *it; |
PageItem *it = GetUniqueItem(QString(Name)); |
QString Daten = QString(Text); |
if (i != -1) |
if (it != NULL) |
{ |
it = Carrier->doc->ActPage->Items.at(i); |
if ((pos < 0) && (pos > static_cast<int>(it->Ptext.count()))) |
return Py_None; |
for (uint a = 0; a < Daten.length(); ++a) |
297,23 → 310,26 |
char *Name = ""; |
int size; |
if (!PyArg_ParseTuple(args, "i|s", &size, &Name)) |
{ |
PyErr_SetString(PyExc_Exception, ERRPARAM + QString("SetTextAlignment(type [, objectname])")); |
return NULL; |
} |
Py_INCREF(Py_None); |
if (!Carrier->HaveDoc) |
return Py_None; |
int i = GetItem(QString(Name)); |
if ((size > 3) || (size < 0)) |
return Py_None; |
if ((i != -1) && (Carrier->doc->ActPage->Items.at(i)->PType == 4)) |
PageItem *i = GetUniqueItem(QString(Name)); |
if ((i != NULL) && (i->PType == 4)) |
{ |
int Apm = Carrier->doc->AppMode; |
Carrier->doc->ActPage->SelItem.clear(); |
Carrier->doc->ActPage->SelItem.append(Carrier->doc->ActPage->Items.at(i)); |
if (Carrier->doc->ActPage->Items.at(i)->HasSel) |
i->OwnPage->SelItem.clear(); |
i->OwnPage->SelItem.append(i); |
if (i->HasSel) |
Carrier->doc->AppMode = 7; |
Carrier->setNewAbStyle(size); |
Carrier->doc->AppMode = Apm; |
Carrier->doc->ActPage->Deselect(); |
i->OwnPage->Deselect(); |
} |
return Py_None; |
} |
323,23 → 339,26 |
char *Name = ""; |
double size; |
if (!PyArg_ParseTuple(args, "d|s", &size, &Name)) |
{ |
PyErr_SetString(PyExc_Exception, ERRPARAM + QString("SetFontSize(size [, objectname])")); |
return NULL; |
} |
Py_INCREF(Py_None); |
if (!Carrier->HaveDoc) |
return Py_None; |
int i = GetItem(QString(Name)); |
if ((size > 512) || (size < 1)) |
return Py_None; |
if ((i != -1) && (Carrier->doc->ActPage->Items.at(i)->PType == 4)) |
PageItem *i = GetUniqueItem(QString(Name)); |
if ((i != NULL) && (i->PType == 4)) |
{ |
int Apm = Carrier->doc->AppMode; |
Carrier->doc->ActPage->SelItem.clear(); |
Carrier->doc->ActPage->SelItem.append(Carrier->doc->ActPage->Items.at(i)); |
if (Carrier->doc->ActPage->Items.at(i)->HasSel) |
i->OwnPage->SelItem.clear(); |
i->OwnPage->SelItem.append(i); |
if (i->HasSel) |
Carrier->doc->AppMode = 7; |
Carrier->doc->ActPage->chFSize(qRound(size * 10.0)); |
i->OwnPage->chFSize(qRound(size * 10.0)); |
Carrier->doc->AppMode = Apm; |
Carrier->doc->ActPage->Deselect(); |
i->OwnPage->Deselect(); |
} |
return Py_None; |
} |
349,24 → 368,24 |
char *Name = ""; |
char *Font = ""; |
if (!PyArg_ParseTuple(args, "s|s", &Font, &Name)) |
{ |
PyErr_SetString(PyExc_Exception, ERRPARAM + QString("SetFont(font [, objectname])")); |
return NULL; |
} |
Py_INCREF(Py_None); |
if (!Carrier->HaveDoc) |
return Py_None; |
int i = GetItem(QString(Name)); |
if ((i != -1) && (Carrier->doc->ActPage->Items.at(i)->PType == 4)) |
PageItem *i = GetUniqueItem(QString(Name)); |
if ((i != NULL) && (i->PType == 4) && (Carrier->Prefs.AvailFonts.find(QString(Font)))) |
{ |
if (Carrier->Prefs.AvailFonts.find(QString(Font))) |
{ |
int Apm = Carrier->doc->AppMode; |
Carrier->doc->ActPage->SelItem.clear(); |
Carrier->doc->ActPage->SelItem.append(Carrier->doc->ActPage->Items.at(i)); |
if (Carrier->doc->ActPage->Items.at(i)->HasSel) |
Carrier->doc->AppMode = 7; |
Carrier->SetNewFont(QString(Font)); |
Carrier->doc->AppMode = Apm; |
Carrier->doc->ActPage->Deselect(); |
} |
int Apm = Carrier->doc->AppMode; |
i->OwnPage->SelItem.clear(); |
i->OwnPage->SelItem.append(i); |
if (i->HasSel) |
Carrier->doc->AppMode = 7; |
Carrier->SetNewFont(QString(Font)); |
Carrier->doc->AppMode = Apm; |
i->OwnPage->Deselect(); |
} |
return Py_None; |
} |
376,13 → 395,16 |
char *Name = ""; |
double w; |
if (!PyArg_ParseTuple(args, "d|s", &w, &Name)) |
{ |
PyErr_SetString(PyExc_Exception, ERRPARAM + QString("SetLineSpacing(spacing [, objectname])")); |
return NULL; |
} |
Py_INCREF(Py_None); |
if ((!Carrier->HaveDoc) || (w < 0.1)) |
return Py_None; |
int i = GetItem(QString(Name)); |
if (i != -1) |
Carrier->doc->ActPage->Items.at(i)->LineSp = w; |
PageItem *i = GetUniqueItem(QString(Name)); |
if (i != NULL) |
i->LineSp = w; |
return Py_None; |
} |
391,13 → 413,16 |
char *Name = ""; |
double w; |
if (!PyArg_ParseTuple(args, "d|s", &w, &Name)) |
{ |
PyErr_SetString(PyExc_Exception, ERRPARAM + QString("SetColumnGap(gap [, objectname])")); |
return NULL; |
} |
Py_INCREF(Py_None); |
if ((!Carrier->HaveDoc) || (w < 0.0)) |
return Py_None; |
int i = GetItem(QString(Name)); |
if (i != -1) |
Carrier->doc->ActPage->Items.at(i)->ColGap = w; |
PageItem *i = GetUniqueItem(QString(Name)); |
if (i != NULL) |
i->ColGap = w; |
return Py_None; |
} |
406,13 → 431,16 |
char *Name = ""; |
int w; |
if (!PyArg_ParseTuple(args, "i|s", &w, &Name)) |
{ |
PyErr_SetString(PyExc_Exception, ERRPARAM + QString("SetColumns(columns [, objectname])")); |
return NULL; |
} |
Py_INCREF(Py_None); |
if ((!Carrier->HaveDoc) || (w < 1)) |
return Py_None; |
int i = GetItem(QString(Name)); |
if (i != -1) |
Carrier->doc->ActPage->Items.at(i)->Cols = w; |
PageItem *i = GetUniqueItem(QString(Name)); |
if (i != NULL) |
i->Cols = w; |
return Py_None; |
} |
421,15 → 449,16 |
char *Name = ""; |
int start, ende; |
if (!PyArg_ParseTuple(args, "ii|s", &start, &ende, &Name)) |
{ |
PyErr_SetString(PyExc_Exception, ERRPARAM + QString("SelectText(start, end [, objectname])")); |
return NULL; |
} |
Py_INCREF(Py_None); |
if (!Carrier->HaveDoc) |
return Py_None; |
int i = GetItem(QString(Name)); |
PageItem *it; |
if (i != -1) |
PageItem *it = GetUniqueItem(QString(Name)); |
if (it != NULL) |
{ |
it = Carrier->doc->ActPage->Items.at(i); |
if ((start < 0) || ((start + ende) > static_cast<int>(it->Ptext.count()-1))) |
return Py_None; |
for (uint a = 0; a < it->Ptext.count(); ++a) |
452,15 → 481,16 |
{ |
char *Name = ""; |
if (!PyArg_ParseTuple(args, "|s", &Name)) |
{ |
PyErr_SetString(PyExc_Exception, ERRPARAM + QString("DeleteText([objectname])")); |
return NULL; |
} |
Py_INCREF(Py_None); |
if (!Carrier->HaveDoc) |
return Py_None; |
int i = GetItem(QString(Name)); |
PageItem *it; |
if (i != -1) |
PageItem *it = GetUniqueItem(QString(Name)); |
if (it != NULL) |
{ |
it = Carrier->doc->ActPage->Items.at(i); |
if (it->HasSel) |
Carrier->DeleteSel(it); |
else |
477,30 → 507,28 |
char *Name = ""; |
char *Color; |
if (!PyArg_ParseTuple(args, "s|s", &Color, &Name)) |
{ |
PyErr_SetString(PyExc_Exception, ERRPARAM + QString("SetTextColor(color [, objectname])")); |
return NULL; |
} |
Py_INCREF(Py_None); |
if (!Carrier->HaveDoc) |
return Py_None; |
int i = GetItem(QString(Name)); |
PageItem *it; |
if (i != -1) |
PageItem *it = GetUniqueItem(QString(Name)); |
if ((it != NULL) && (it->PType == 4) || (it->PType == 8)) |
{ |
it = Carrier->doc->ActPage->Items.at(i); |
if ((it->PType == 4) || (it->PType == 8)) |
for (uint b = 0; b < it->Ptext.count(); b++) |
{ |
for (uint b = 0; b < it->Ptext.count(); b++) |
if (it->HasSel) |
{ |
if (it->HasSel) |
{ |
if (it->Ptext.at(b)->cselect) |
it->Ptext.at(b)->ccolor = QString(Color); |
} |
else |
if (it->Ptext.at(b)->cselect) |
it->Ptext.at(b)->ccolor = QString(Color); |
} |
it->TxtFill = QString(Color); |
else |
it->Ptext.at(b)->ccolor = QString(Color); |
} |
} |
it->TxtFill = QString(Color); |
} // if |
return Py_None; |
} |
509,30 → 537,28 |
char *Name = ""; |
char *Color; |
if (!PyArg_ParseTuple(args, "s|s", &Color, &Name)) |
{ |
PyErr_SetString(PyExc_Exception, ERRPARAM + QString("SetTextStroke(color [, objectname])")); |
return NULL; |
} |
Py_INCREF(Py_None); |
if (!Carrier->HaveDoc) |
return Py_None; |
int i = GetItem(QString(Name)); |
PageItem *it; |
if (i != -1) |
PageItem *it = GetUniqueItem(QString(Name)); |
if ((it != NULL) && (it->PType == 4) || (it->PType == 8)) |
{ |
it = Carrier->doc->ActPage->Items.at(i); |
if ((it->PType == 4) || (it->PType == 8)) |
for (uint b = 0; b < it->Ptext.count(); b++) |
{ |
for (uint b = 0; b < it->Ptext.count(); b++) |
if (it->HasSel) |
{ |
if (it->HasSel) |
{ |
if (it->Ptext.at(b)->cselect) |
it->Ptext.at(b)->cstroke = QString(Color); |
} |
else |
if (it->Ptext.at(b)->cselect) |
it->Ptext.at(b)->cstroke = QString(Color); |
} |
it->TxtStroke = QString(Color); |
else |
it->Ptext.at(b)->cstroke = QString(Color); |
} |
} |
it->TxtStroke = QString(Color); |
} // if |
return Py_None; |
} |
541,29 → 567,27 |
char *Name = ""; |
int w; |
if (!PyArg_ParseTuple(args, "i|s", &w, &Name)) |
{ |
PyErr_SetString(PyExc_Exception, ERRPARAM + QString("SetTextShade(type [, objectname])")); |
return NULL; |
} |
Py_INCREF(Py_None); |
if ((!Carrier->HaveDoc) || ((w < 0) || (w > 100))) |
return Py_None; |
int i = GetItem(QString(Name)); |
PageItem *it; |
if (i != -1) |
PageItem *it = GetUniqueItem(QString(Name)); |
if ((it != NULL) && (it->PType == 4) || (it->PType == 8)) |
{ |
it = Carrier->doc->ActPage->Items.at(i); |
if ((it->PType == 4) || (it->PType == 8)) |
for (uint b = 0; b < it->Ptext.count(); ++b) |
{ |
for (uint b = 0; b < it->Ptext.count(); ++b) |
if (it->HasSel) |
{ |
if (it->HasSel) |
{ |
if (it->Ptext.at(b)->cselect) |
it->Ptext.at(b)->cshade = w; |
} |
else |
if (it->Ptext.at(b)->cselect) |
it->Ptext.at(b)->cshade = w; |
} |
else |
it->Ptext.at(b)->cshade = w; |
} |
it->ShTxtFill = w; |
it->ShTxtFill = w; |
} |
return Py_None; |
} |
574,12 → 598,13 |
char *name2; |
if (!PyArg_ParseTuple(args, "ss", &name1, &name2)) |
{ |
PyErr_SetString(PyExc_Exception, ERRPARAM + QString("LinkTextFrames(objectname, objectname)")); |
return NULL; |
} |
Py_INCREF(Py_None); |
if (!Carrier->HaveDoc) |
return Py_None; |
PageItem *item1 = GetUniqueItem(QString(name1)); |
if (!item1) |
return Py_None; |
586,7 → 611,6 |
PageItem *item2 = GetUniqueItem(QString(name2)); |
if (!item2) |
return Py_None; |
/* only empty textframe, only not linked and selfhate :) */ |
if ((item2->Ptext.count() == 0) && (item2->NextBox == 0) |
&& (item2->BackBox == 0) && (item1 != item2)) |
598,9 → 622,7 |
item2->OwnPage->repaint(); |
// enable 'save icon' stuff |
Carrier->slotDocCh(); |
} // if empty |
return Py_None; |
} |
607,18 → 629,17 |
PyObject *scribus_unlinktextframes(PyObject * self, PyObject* args) |
{ |
char *name; |
if (!PyArg_ParseTuple(args, "s", &name)) |
{ |
PyErr_SetString(PyExc_Exception, ERRPARAM + QString("UnlinkTextFrames(objectname)")); |
return NULL; |
} |
Py_INCREF(Py_None); |
if (!Carrier->HaveDoc) |
return Py_None; |
PageItem *item = GetUniqueItem(name); |
if (!item) |
return Py_None; |
// only linked |
if (item->BackBox != 0) |
{ |
640,7 → 661,6 |
item->BackBox->NextBox = 0; |
item->BackBox = 0; |
} // if |
// enable 'save icon' stuff |
Carrier->slotDocCh(); |
item->OwnPage->repaint(); |
/trunk/Scribus/scribus/plugins/scriptplugin/cmdmani.cpp |
---|
3,18 → 3,30 |
#include "cmdutil.h" |
#include "cmdvar.h" |
/* |
07/10/2004 exceptions raised when wrong params called, most of the procs. are |
handling the all pages - not just actual - now. pv. |
*/ |
PyObject *scribus_loadimage(PyObject *self, PyObject* args) |
{ |
char *Name = ""; |
char *Image; |
if (!PyArg_ParseTuple(args, "s|s", &Image, &Name)) |
{ |
PyErr_SetString(PyExc_Exception, ERRPARAM + QString("LoadImage(filename [, objectname])")); |
return NULL; |
} |
Py_INCREF(Py_None); |
if (!Carrier->HaveDoc) |
return Py_None; |
int i = GetItem(QString(Name)); |
if (i != -1) |
Carrier->doc->ActPage->LoadPict(QString(Image), i); |
PageItem *item = GetUniqueItem(QString(Name)); |
if (item == NULL) |
{ |
PyErr_SetString(PyExc_Exception, QObject::tr("Oook! You're trying to load image into an object doesn't exist or isn't selected!")); |
return NULL; |
} |
item->OwnPage->LoadPict(QString(Image), item->ItemNr); |
return Py_None; |
} |
23,17 → 35,19 |
char *Name = ""; |
double x, y; |
if (!PyArg_ParseTuple(args, "dd|s", &x, &y, &Name)) |
{ |
PyErr_SetString(PyExc_Exception, ERRPARAM + QString("ScaleImage(x, y [, objectname])")); |
return NULL; |
} |
Py_INCREF(Py_None); |
if (!Carrier->HaveDoc) |
return Py_None; |
int i = GetItem(QString(Name)); |
if ((i != -1) && (Carrier->doc->ActPage->Items.at(i)->PType == 2)) |
{ |
PageItem *b = Carrier->doc->ActPage->Items.at(i); |
b->LocalScX = x; |
b->LocalScY = y; |
} |
PageItem *item = GetUniqueItem(Name); |
if (item != NULL && item->PType == 2) |
{ |
item->LocalScX = x; |
item->LocalScY = y; |
} |
return Py_None; |
} |
42,18 → 56,21 |
char *Name = ""; |
double x, y; |
if (!PyArg_ParseTuple(args, "dd|s", &x, &y, &Name)) |
{ |
PyErr_SetString(PyExc_Exception, ERRPARAM + QString("MoveObject(x, y [, objectname])")); |
return NULL; |
} |
Py_INCREF(Py_None); |
if (!Carrier->HaveDoc) |
return Py_None; |
int i = GetItem(QString(Name)); |
if (i != -1) |
{ |
if (Carrier->doc->ActPage->GroupSel) |
Carrier->doc->ActPage->moveGroup(ValueToPoint(x), ValueToPoint(y)); |
PageItem *item = GetUniqueItem(QString(Name)); |
if (item!=NULL) |
{ |
if (item->OwnPage->GroupSel) |
item->OwnPage->moveGroup(ValueToPoint(x), ValueToPoint(y)); |
else |
Carrier->doc->ActPage->MoveItem(ValueToPoint(x), ValueToPoint(y), Carrier->doc->ActPage->Items.at(i)); |
} |
item->OwnPage->MoveItem(ValueToPoint(x), ValueToPoint(y), item); |
} |
return Py_None; |
} |
62,25 → 79,26 |
char *Name = ""; |
double x, y; |
if (!PyArg_ParseTuple(args, "dd|s", &x, &y, &Name)) |
{ |
PyErr_SetString(PyExc_Exception, ERRPARAM + QString("MoveObjectAbs(x, y [, objectname])")); |
return NULL; |
} |
Py_INCREF(Py_None); |
if (!Carrier->HaveDoc) |
return Py_None; |
int i = GetItem(QString(Name)); |
if (i != -1) |
PageItem *item = GetUniqueItem(QString(Name)); |
if (item != NULL) |
{ |
if (item->OwnPage->GroupSel) |
{ |
if (Carrier->doc->ActPage->GroupSel) |
{ |
double x2, y2, w, h; |
Carrier->doc->ActPage->getGroupRect(&x2, &y2, &w, &h); |
Carrier->doc->ActPage->moveGroup(ValueToPoint(x) - x2, ValueToPoint(y) - y2); |
} |
item->OwnPage->getGroupRect(&x2, &y2, &w, &h); |
item->OwnPage->moveGroup(ValueToPoint(x) - x2, ValueToPoint(y) - y2); |
} |
else |
{ |
PageItem *b = Carrier->doc->ActPage->Items.at(i); |
Carrier->doc->ActPage->MoveItem(ValueToPoint(x) - b->Xpos, ValueToPoint(y) - b->Ypos, b); |
} |
} |
//PageItem *b = Carrier->doc->ActPage->Items.at(i); |
item->OwnPage->MoveItem(ValueToPoint(x) - item->Xpos, ValueToPoint(y) - item->Ypos, item); |
} |
return Py_None; |
} |
89,13 → 107,16 |
char *Name = ""; |
double x; |
if (!PyArg_ParseTuple(args, "d|s", &x, &Name)) |
{ |
PyErr_SetString(PyExc_Exception, ERRPARAM + QString("RotateObject(angle [, objectname])")); |
return NULL; |
} |
Py_INCREF(Py_None); |
if (!Carrier->HaveDoc) |
return Py_None; |
int i = GetItem(QString(Name)); |
if (i != -1) |
Carrier->doc->ActPage->RotateItem(Carrier->doc->ActPage->Items.at(i)->Rot - x, i); |
PageItem *item = GetUniqueItem(QString(Name)); |
if (item != NULL) |
item->OwnPage->RotateItem(item->Rot - x, item->ItemNr); |
return Py_None; |
} |
104,13 → 125,16 |
char *Name = ""; |
double x; |
if (!PyArg_ParseTuple(args, "d|s", &x, &Name)) |
{ |
PyErr_SetString(PyExc_Exception, ERRPARAM + QString("RotateObjectAbs(angle [, objectname])")); |
return NULL; |
} |
Py_INCREF(Py_None); |
if (!Carrier->HaveDoc) |
return Py_None; |
int i = GetItem(QString(Name)); |
if (i != -1) |
Carrier->doc->ActPage->RotateItem(x * -1.0, i); |
PageItem *item = GetUniqueItem(QString(Name)); |
if (item != NULL) |
item->OwnPage->RotateItem(x * -1.0, item->ItemNr); |
return Py_None; |
} |
119,16 → 143,18 |
char *Name = ""; |
double x, y; |
if (!PyArg_ParseTuple(args, "dd|s", &x, &y, &Name)) |
{ |
PyErr_SetString(PyExc_Exception, ERRPARAM + QString("SizeObject(x, y [, objectname])")); |
return NULL; |
} |
Py_INCREF(Py_None); |
if (!Carrier->HaveDoc) |
return Py_None; |
int i = GetItem(QString(Name)); |
if (i != -1) |
{ |
PageItem *b = Carrier->doc->ActPage->Items.at(i); |
Carrier->doc->ActPage->SizeItem(ValueToPoint(x) - b->Xpos, ValueToPoint(y) - b->Ypos, i); |
} |
PageItem *item = GetUniqueItem(QString(Name)); |
if (item != NULL) |
{ |
item->OwnPage->SizeItem(ValueToPoint(x) - item->Xpos, ValueToPoint(y) - item->Ypos, item->ItemNr); |
} |
return Py_None; |
} |
137,9 → 163,14 |
char *Name = ""; |
PyObject *il = 0; |
if (!PyArg_ParseTuple(args, "|O", &il)) |
{ |
PyErr_SetString(PyExc_Exception, ERRPARAM + QString("GroupObjects([list_of_objectnames])")); |
return NULL; |
} |
Page *p = Carrier->doc->ActPage; |
uint ap = Carrier->doc->ActPage->PageNr; |
if (il != 0) |
{ |
{ |
if (!PyList_Check(il)) |
return NULL; |
Py_INCREF(Py_None); |
149,24 → 180,29 |
if (len == 0) |
return Py_None; |
for (int i = 0; i < len; i++) |
{ |
Name = PyString_AsString(PyList_GetItem(il, i)); |
PageItem *ic = GetUniqueItem(QString(Name)); |
if (ic != NULL) |
{ |
Name = PyString_AsString(PyList_GetItem(il, i)); |
int ic = GetItem(QString(Name)); |
if (ic != -1) |
Carrier->doc->ActPage->SelectItemNr(ic); |
ic->OwnPage->SelectItemNr(ic->ItemNr); |
p = ic->OwnPage; |
} |
} |
} |
else |
{ |
{ |
Py_INCREF(Py_None); |
if (!Carrier->HaveDoc) |
return Py_None; |
} |
if (Carrier->doc->ActPage->SelItem.count() != 0) |
{ |
} |
if (p->SelItem.count() != 0) |
{ |
Carrier->view->GotoPage(p->PageNr); |
Carrier->GroupObj(); |
Carrier->doc->ActPage->Deselect(); |
} |
p->Deselect(); |
Carrier->view->GotoPage(ap); |
} |
return Py_None; |
} |
174,13 → 210,21 |
{ |
char *Name = "";; |
if (!PyArg_ParseTuple(args, "|s", &Name)) |
{ |
PyErr_SetString(PyExc_Exception, ERRPARAM + QString("UnGroupObject([objectname])")); |
return NULL; |
} |
Py_INCREF(Py_None); |
if (!Carrier->HaveDoc) |
return Py_None; |
int i = GetItem(QString(Name)); |
if (i != -1) |
PageItem *i = GetUniqueItem(QString(Name)); |
if (i != NULL) |
{ |
uint p = Carrier->doc->ActPage->PageNr; |
Carrier->view->GotoPage(i->OwnPage->PageNr); |
Carrier->UnGroupObj(); |
Carrier->view->GotoPage(p); |
} |
return Py_None; |
} |
189,7 → 233,10 |
char *Name = ""; |
double sc; |
if (!PyArg_ParseTuple(args, "d|s", &sc, &Name)) |
{ |
PyErr_SetString(PyExc_Exception, ERRPARAM + QString("ScaleGroup(scale [, objectname])")); |
return NULL; |
} |
Py_INCREF(Py_None); |
if (!Carrier->HaveDoc) |
return Py_None; |
196,16 → 243,16 |
else |
if (sc == 0.0) |
return Py_None; |
int i = GetItem(QString(Name)); |
if (i != -1) |
{ |
Carrier->doc->ActPage->Deselect(); |
Carrier->doc->ActPage->SelectItemNr(i); |
int h = Carrier->doc->ActPage->HowTo; |
Carrier->doc->ActPage->HowTo = 1; |
Carrier->doc->ActPage->scaleGroup(sc, sc); |
Carrier->doc->ActPage->HowTo = h; |
} |
PageItem *i = GetUniqueItem(QString(Name)); |
if (i != NULL) |
{ |
i->OwnPage->Deselect(); |
i->OwnPage->SelectItemNr(i->ItemNr); |
int h = i->OwnPage->HowTo; |
i->OwnPage->HowTo = 1; |
i->OwnPage->scaleGroup(sc, sc); |
i->OwnPage->HowTo = h; |
} |
return Py_None; |
} |
213,7 → 260,10 |
{ |
int i = 0; |
if (!PyArg_ParseTuple(args, "|i", &i)) |
{ |
PyErr_SetString(PyExc_Exception, ERRPARAM + QString("GetSelectedObject([objectnumber])")); |
return NULL; |
} |
if (!Carrier->HaveDoc) |
return PyString_FromString(""); |
if ((i < static_cast<int>(Carrier->doc->ActPage->SelItem.count())) && (i > -1)) |
225,7 → 275,10 |
PyObject *scribus_selcount(PyObject *self, PyObject* args) |
{ |
if (!PyArg_ParseTuple(args, "")) |
{ |
PyErr_SetString(PyExc_Exception, ERRPARAM + QString("SelectionCount()")); |
return NULL; |
} |
if (!Carrier->HaveDoc) |
return PyInt_FromLong(0L); |
return PyInt_FromLong(static_cast<long>(Carrier->doc->ActPage->SelItem.count())); |
235,15 → 288,18 |
{ |
char *Name = ""; |
if (!PyArg_ParseTuple(args, "s", &Name)) |
{ |
PyErr_SetString(PyExc_Exception, ERRPARAM + QString("SelectObject(objectname)")); |
return NULL; |
} |
Py_INCREF(Py_None); |
if (!Carrier->HaveDoc) |
return Py_None; |
if (Name == "") |
return Py_None; |
int i = GetItem(QString(Name)); |
if (i != -1) |
Carrier->doc->ActPage->SelectItemNr(i); |
PageItem *i = GetUniqueItem(QString(Name)); |
if (i != NULL) |
i->OwnPage->SelectItemNr(i->ItemNr); |
return Py_None; |
} |
250,10 → 306,65 |
PyObject *scribus_deselect(PyObject *self, PyObject* args) |
{ |
if (!PyArg_ParseTuple(args, "")) |
{ |
PyErr_SetString(PyExc_Exception, ERRPARAM + QString("DeselectAll()")); |
return NULL; |
} |
Py_INCREF(Py_None); |
if (Carrier->HaveDoc) |
Carrier->doc->ActPage->Deselect(); |
if (!Carrier->HaveDoc) |
return Py_None; |
for (uint i = 0; i < Carrier->view->Pages.count(); i++) |
Carrier->view->Pages.at(i)->Deselect(); |
return Py_None; |
} |
PyObject *scribus_lockobject(PyObject *self, PyObject* args) |
{ |
char *name = ""; |
if (!PyArg_ParseTuple(args, "|s", &name)) |
{ |
PyErr_SetString(PyExc_Exception, ERRPARAM + QString("LockObject([objectname])")); |
return NULL; |
} |
if (!Carrier->HaveDoc) |
{ |
Py_INCREF(Py_None); |
return Py_None; |
} |
PageItem *item = GetUniqueItem(QString(name)); |
if (item == NULL) |
{ |
PyErr_SetString(PyExc_Exception, |
QObject::tr("Oook! You're trying to (un)lock an object doesn't exist! None selected too.")); |
return NULL; |
} |
item->Locked = !item->Locked; |
if (item->Locked) |
return PyInt_FromLong(1); |
return PyInt_FromLong(0); |
} |
PyObject *scribus_islocked(PyObject *self, PyObject* args) |
{ |
char *name = ""; |
if (!PyArg_ParseTuple(args, "|s", &name)) |
{ |
PyErr_SetString(PyExc_Exception, ERRPARAM + QString("IsLocked([objectname])")); |
return NULL; |
} |
if (!Carrier->HaveDoc) |
{ |
Py_INCREF(Py_None); |
return Py_None; |
} |
PageItem *item = GetUniqueItem(name); |
if (item == NULL) |
{ |
PyErr_SetString(PyExc_Exception, QObject::tr("Oook! You're trying to query an object doesn't exist! None selected too.")); |
return NULL; |
} |
if (item->Locked) |
return PyInt_FromLong(1); |
return PyInt_FromLong(0); |
} |
/trunk/Scribus/scribus/plugins/scriptplugin/cmdsetprop.cpp |
---|
10,14 → 10,16 |
char *Color2; |
int typ, shade1, shade2; |
if (!PyArg_ParseTuple(args, "isisi|s", &typ, &Color1, &shade1, &Color2, &shade2, &Name)) |
{ |
PyErr_SetString(PyExc_Exception, ERRPARAM + QString("SetGradientFill(type, color1, shade1, color2, shade2 [, objectname])")); |
return NULL; |
} |
Py_INCREF(Py_None); |
if (!Carrier->HaveDoc) |
return Py_None; |
int i = GetItem(QString(Name)); |
if (i != -1) |
{ |
PageItem *b = Carrier->doc->ActPage->Items.at(i); |
PageItem *b = GetUniqueItem(QString(Name)); |
if (b != NULL) |
{ |
QColor tmp; |
b->fill_gradient.clearStops(); |
QString c1 = QString(Color1); |
27,9 → 29,9 |
b->SetFarbe(&tmp, c2, shade2); |
b->fill_gradient.addStop(tmp, 1.0, 0.5, 1.0, c2, shade2); |
b->GrType = typ; |
Carrier->doc->ActPage->updateGradientVectors(b); |
Carrier->doc->ActPage->RefreshItem(b); |
} |
b->OwnPage->updateGradientVectors(b); |
b->OwnPage->RefreshItem(b); |
} |
return Py_None; |
} |
38,13 → 40,16 |
char *Name = ""; |
char *Color; |
if (!PyArg_ParseTuple(args, "s|s", &Color, &Name)) |
{ |
PyErr_SetString(PyExc_Exception, ERRPARAM + QString("SetFillColor(color [, objectname])")); |
return NULL; |
} |
Py_INCREF(Py_None); |
if (!Carrier->HaveDoc) |
return Py_None; |
int i = GetItem(QString(Name)); |
if (i != -1) |
Carrier->doc->ActPage->Items.at(i)->Pcolor = QString(Color); |
PageItem *i = GetUniqueItem(QString(Name)); |
if (i != NULL) |
i->Pcolor = QString(Color); |
return Py_None; |
} |
53,17 → 58,16 |
char *Name = ""; |
char *Color; |
if (!PyArg_ParseTuple(args, "s|s", &Color, &Name)) |
{ |
PyErr_SetString(PyExc_Exception, ERRPARAM + QString("SetLineColor(color [, objectname])")); |
return NULL; |
} |
Py_INCREF(Py_None); |
if (!Carrier->HaveDoc) |
return Py_None; |
int i = GetItem(QString(Name)); |
PageItem *it; |
if (i != -1) |
{ |
it = Carrier->doc->ActPage->Items.at(i); |
PageItem *it = GetUniqueItem(QString(Name)); |
if (it != NULL) |
it->Pcolor2 = QString(Color); |
} |
return Py_None; |
} |
72,13 → 76,16 |
char *Name = ""; |
double w; |
if (!PyArg_ParseTuple(args, "d|s", &w, &Name)) |
{ |
PyErr_SetString(PyExc_Exception, ERRPARAM + QString("SetLineWidth(width [, objectname])")); |
return NULL; |
} |
Py_INCREF(Py_None); |
if ((!Carrier->HaveDoc) || ((w < 0.0) || (w > 12.0))) |
return Py_None; |
int i = GetItem(QString(Name)); |
if (i != -1) |
Carrier->doc->ActPage->Items.at(i)->Pwidth = w; |
PageItem *i = GetUniqueItem(QString(Name)); |
if (i != NULL) |
i->Pwidth = w; |
return Py_None; |
} |
87,17 → 94,16 |
char *Name = ""; |
int w; |
if (!PyArg_ParseTuple(args, "i|s", &w, &Name)) |
{ |
PyErr_SetString(PyExc_Exception, ERRPARAM + QString("SetLineShade(shade [, objectname])")); |
return NULL; |
} |
Py_INCREF(Py_None); |
if ((!Carrier->HaveDoc) || ((w < 0) || (w > 100))) |
return Py_None; |
int i = GetItem(QString(Name)); |
PageItem *it; |
if (i != -1) |
{ |
it = Carrier->doc->ActPage->Items.at(i); |
PageItem *it = GetUniqueItem(QString(Name)); |
if (it != NULL) |
it->Shade2 = w; |
} |
return Py_None; |
} |
106,13 → 112,16 |
char *Name = ""; |
int w; |
if (!PyArg_ParseTuple(args, "i|s", &w, &Name)) |
{ |
PyErr_SetString(PyExc_Exception, ERRPARAM + QString("SetFillShade(shade [, objectname])")); |
return NULL; |
} |
Py_INCREF(Py_None); |
if ((!Carrier->HaveDoc) || ((w < 0) || (w > 100))) |
return Py_None; |
int i = GetItem(QString(Name)); |
if (i != -1) |
Carrier->doc->ActPage->Items.at(i)->Shade = w; |
PageItem *i = GetUniqueItem(QString(Name)); |
if (i != NULL) |
i->Shade = w; |
return Py_None; |
} |
121,13 → 130,16 |
char *Name = ""; |
int w; |
if (!PyArg_ParseTuple(args, "i|s", &w, &Name)) |
{ |
PyErr_SetString(PyExc_Exception, ERRPARAM + QString("SetLineJoin(jointype [, objectname])")); |
return NULL; |
} |
Py_INCREF(Py_None); |
if (!Carrier->HaveDoc) |
return Py_None; |
int i = GetItem(QString(Name)); |
if (i != -1) |
Carrier->doc->ActPage->Items.at(i)->PLineJoin = Qt::PenJoinStyle(w); |
PageItem *i = GetUniqueItem(QString(Name)); |
if (i != NULL) |
i->PLineJoin = Qt::PenJoinStyle(w); |
return Py_None; |
} |
136,13 → 148,16 |
char *Name = ""; |
int w; |
if (!PyArg_ParseTuple(args, "i|s", &w, &Name)) |
{ |
PyErr_SetString(PyExc_Exception, ERRPARAM + QString("SetLineEnd(endtype [, objectname])")); |
return NULL; |
} |
Py_INCREF(Py_None); |
if (!Carrier->HaveDoc) |
return Py_None; |
int i = GetItem(QString(Name)); |
if (i != -1) |
Carrier->doc->ActPage->Items.at(i)->PLineEnd = Qt::PenCapStyle(w); |
PageItem *i = GetUniqueItem(QString(Name)); |
if (i != NULL) |
i->PLineEnd = Qt::PenCapStyle(w); |
return Py_None; |
} |
151,13 → 166,16 |
char *Name = ""; |
int w; |
if (!PyArg_ParseTuple(args, "i|s", &w, &Name)) |
{ |
PyErr_SetString(PyExc_Exception, ERRPARAM + QString("SetLineStyle(style [, objectname])")); |
return NULL; |
} |
Py_INCREF(Py_None); |
if (!Carrier->HaveDoc) |
return Py_None; |
int i = GetItem(QString(Name)); |
if (i != -1) |
Carrier->doc->ActPage->Items.at(i)->PLineArt = Qt::PenStyle(w); |
PageItem *i = GetUniqueItem(QString(Name)); |
if (i != NULL) |
i->PLineArt = Qt::PenStyle(w); |
return Py_None; |
} |
166,23 → 184,25 |
char *Name = ""; |
int w; |
if (!PyArg_ParseTuple(args, "i|s", &w, &Name)) |
{ |
PyErr_SetString(PyExc_Exception, ERRPARAM + QString("SetCornerRadius(radius [, objectname])")); |
return NULL; |
} |
Py_INCREF(Py_None); |
if ((!Carrier->HaveDoc) || (w < 0)) |
return Py_None; |
int i = GetItem(QString(Name)); |
if (i != -1) |
PageItem *b = GetUniqueItem(QString(Name)); |
if (b != NULL) |
{ |
if ((b->PType == 2) || (b->PType == 3) || (b->PType == 4)) |
{ |
PageItem *b = Carrier->doc->ActPage->Items.at(i); |
if ((b->PType == 2) || (b->PType == 3) || (b->PType == 4)) |
{ |
b->RadRect = w; |
if (w > 0) |
Carrier->doc->ActPage->SetFrameRound(b); |
else |
Carrier->doc->ActPage->SetRectFrame(b); |
} |
b->OwnPage->SetFrameRound(b); |
} |
else |
b->OwnPage->SetRectFrame(b); |
} |
return Py_None; |
} |
191,17 → 211,16 |
char *Name = ""; |
char *Color; |
if (!PyArg_ParseTuple(args, "s|s", &Color, &Name)) |
{ |
PyErr_SetString(PyExc_Exception, ERRPARAM + QString("SetMultiLine(color [, objectname])")); |
return NULL; |
} |
Py_INCREF(Py_None); |
if (!Carrier->HaveDoc) |
return Py_None; |
int i = GetItem(QString(Name)); |
if (i != -1) |
{ |
PageItem *b = Carrier->doc->ActPage->Items.at(i); |
PageItem *b = GetUniqueItem(QString(Name)); |
if (b != NULL) |
if (Carrier->doc->MLineStyles.contains(QString(Color))) |
b->NamedLStyle = QString(Color); |
} |
return Py_None; |
} |
/trunk/Scribus/scribus/plugins/scriptplugin/cmdvar.h |
---|
7,6 → 7,8 |
#include "scribus.h" |
#define ERRPARAM QObject::tr("Oook! Wrong arguments! Call: ") |
/* Static global Variables */ |
extern ScribusApp* Carrier; |
/trunk/Scribus/scribus/plugins/scriptplugin/cmddoc.cpp |
---|
11,7 → 11,10 |
if ((!PyArg_ParseTuple(args, "OOiiiii", &p, &m, &ori, &fNr, &unit, &ds, &fsl)) || |
(!PyArg_ParseTuple(p, "dd", &b, &h)) || |
(!PyArg_ParseTuple(m, "dddd", &lr, &rr, &tpr, &btr))) |
{ |
PyErr_SetString(PyExc_Exception, ERRPARAM + QString("NewDoc(size, margins, orientation, firstPageNumber, unit, FacingPages, FirstSideLeft)")); |
return NULL; |
} |
b = ValToPts(b, unit); |
h = ValToPts(h, unit); |
if (ori == 1) |
19,7 → 22,7 |
ebr = b; |
b = h; |
h = ebr; |
} |
} |
tpr = ValToPts(tpr, unit); |
lr = ValToPts(lr, unit); |
rr = ValToPts(rr, unit); |
33,7 → 36,10 |
{ |
double lr, tpr, btr, rr; |
if (!PyArg_ParseTuple(args, "dddd", &lr, &rr, &tpr, &btr)) |
{ |
PyErr_SetString(PyExc_Exception, ERRPARAM + QString("SetMargins(lr, rr, tr, br)")); |
return NULL; |
} |
Py_INCREF(Py_None); |
if (!Carrier->HaveDoc) |
return Py_None; |
52,7 → 58,10 |
PyObject *scribus_closedoc(PyObject *self, PyObject* args) |
{ |
if (!PyArg_ParseTuple(args, "")) |
{ |
PyErr_SetString(PyExc_Exception, ERRPARAM + QString("CloseDoc()")); |
return NULL; |
} |
if (!Carrier->HaveDoc) |
return PyInt_FromLong(0L); |
Carrier->doc->setUnModified(); |
64,7 → 73,10 |
PyObject *scribus_havedoc(PyObject *self, PyObject* args) |
{ |
if (!PyArg_ParseTuple(args, "")) |
{ |
PyErr_SetString(PyExc_Exception, ERRPARAM + QString("HaveDoc()")); |
return NULL; |
} |
return PyInt_FromLong(static_cast<long>(Carrier->HaveDoc)); |
} |
72,7 → 84,10 |
{ |
char *Name; |
if (!PyArg_ParseTuple(args, "s", &Name)) |
{ |
PyErr_SetString(PyExc_Exception, ERRPARAM + QString("OpenDoc(docname)")); |
return NULL; |
} |
bool ret = Carrier->LadeDoc(QString(Name)); |
// qApp->processEvents(); |
return PyInt_FromLong(static_cast<long>(ret)); |
81,7 → 96,10 |
PyObject *scribus_savedoc(PyObject *self, PyObject* args) |
{ |
if (!PyArg_ParseTuple(args, "")) |
{ |
PyErr_SetString(PyExc_Exception, ERRPARAM + QString("SaveDoc()")); |
return NULL; |
} |
if (!Carrier->HaveDoc) |
return PyInt_FromLong(0L); |
Carrier->slotFileSave(); |
93,7 → 111,10 |
{ |
char *Name; |
if (!PyArg_ParseTuple(args, "s", &Name)) |
{ |
PyErr_SetString(PyExc_Exception, ERRPARAM + QString("SaveDocAs(docname)")); |
return NULL; |
} |
if (!Carrier->HaveDoc) |
return PyInt_FromLong(0L); |
bool ret = Carrier->DoFileSave(QString(Name)); |
107,7 → 128,10 |
char *Title; |
char *Desc; |
if (!PyArg_ParseTuple(args, "zzz", &Author, &Title, &Desc)) |
{ |
PyErr_SetString(PyExc_Exception, ERRPARAM + QString("SetInfo(Author, Info, Description)")); |
return NULL; |
} |
Py_INCREF(Py_None); |
if (!Carrier->HaveDoc) |
return Py_None; |
122,7 → 146,10 |
{ |
int e; |
if (!PyArg_ParseTuple(args, "i", &e)) |
{ |
PyErr_SetString(PyExc_Exception, ERRPARAM + QString("SetUnit(unit)")); |
return NULL; |
} |
Py_INCREF(Py_None); |
if ((!Carrier->HaveDoc) || ((e < 0) || (e > 3))) |
return Py_None; |
133,7 → 160,10 |
PyObject *scribus_getunit(PyObject *self, PyObject* args) |
{ |
if (!PyArg_ParseTuple(args, "")) |
{ |
PyErr_SetString(PyExc_Exception, ERRPARAM + QString("GetUnit()")); |
return NULL; |
} |
if (!Carrier->HaveDoc) |
return PyInt_FromLong(0L); |
return PyInt_FromLong(static_cast<long>(Carrier->doc->Einheit)); |
/trunk/Scribus/scribus/plugins/scriptplugin/cmdcolor.cpp |
---|
9,7 → 9,10 |
PyObject *l; |
int cc = 0; |
if (!PyArg_ParseTuple(args, "")) |
{ |
PyErr_SetString(PyExc_Exception, ERRPARAM + QString("GetColorNames()")); |
return NULL; |
} |
edc = Carrier->HaveDoc ? Carrier->doc->PageColors : Carrier->Prefs.DColors; |
CListe::Iterator it; |
l = PyList_New(edc.count()); |
27,7 → 30,10 |
char *Name = ""; |
int c, m, y, k; |
if (!PyArg_ParseTuple(args, "s", &Name)) |
{ |
PyErr_SetString(PyExc_Exception, ERRPARAM + QString("GetColor(name)")); |
return NULL; |
} |
if (Name == "") |
return Py_BuildValue("(iiii)", 0, 0, 0, 0); |
edc = Carrier->HaveDoc ? Carrier->doc->PageColors : Carrier->Prefs.DColors; |
43,23 → 49,26 |
char *Name = ""; |
int c, m, y, k; |
if (!PyArg_ParseTuple(args, "siiii", &Name, &c, &m, &y, &k)) |
{ |
PyErr_SetString(PyExc_Exception, ERRPARAM + QString("ChangeColor(colorname, c, m, y, k)")); |
return NULL; |
} |
Py_INCREF(Py_None); |
if (Name == "") |
return Py_None; |
QString col = QString(Name); |
if (Carrier->HaveDoc) |
{ |
{ |
if (!Carrier->doc->PageColors.contains(col)) |
return Py_None; |
Carrier->doc->PageColors[col].setColor(c, m, y, k); |
} |
Carrier->doc->PageColors[col].setColor(c, m, y, k); |
} |
else |
{ |
{ |
if (!Carrier->Prefs.DColors.contains(col)) |
return Py_None; |
Carrier->Prefs.DColors[col].setColor(c, m, y, k); |
} |
} |
return Py_None; |
} |
68,7 → 77,10 |
char *Name = ""; |
int c, m, y, k; |
if (!PyArg_ParseTuple(args, "siiii", &Name, &c, &m, &y, &k)) |
{ |
PyErr_SetString(PyExc_Exception, ERRPARAM + QString("DefineColor(colorname, c, m, y, k)")); |
return NULL; |
} |
Py_INCREF(Py_None); |
if (Name == "") |
return Py_None; |
95,7 → 107,10 |
char *Name = ""; |
char *Repl = "None"; |
if (!PyArg_ParseTuple(args, "s|s", &Name, &Repl)) |
{ |
PyErr_SetString(PyExc_Exception, ERRPARAM + QString("DeleteColor(colorname [, replacewithname])")); |
return NULL; |
} |
Py_INCREF(Py_None); |
if (Name == "") |
return Py_None; |
122,7 → 137,10 |
char *Name = ""; |
char *Repl = "None"; |
if (!PyArg_ParseTuple(args, "s|s", &Name, &Repl)) |
{ |
PyErr_SetString(PyExc_Exception, ERRPARAM + QString("ReplaceColor(colorname [, replacewithname])")); |
return NULL; |
} |
Py_INCREF(Py_None); |
if (Name == "") |
return Py_None; |
/trunk/Scribus/scribus/plugins/scriptplugin/cmdobj.h |
---|
20,7 → 20,7 |
PyObject *scribus_newline(PyObject *self, PyObject* args); |
/** Creates a polygon line - list with points and opt. name as params. */ |
PyObject *scribus_polyline(PyObject *self, PyObject* args); |
/** Creates a polygon - - list with points and opt. name as params. */ |
/** Creates a polygon - list with points and opt. name as params. */ |
PyObject *scribus_polygon(PyObject *self, PyObject* args); |
/** Creates a Bezier line - list with points and opt. name as params. */ |
PyObject *scribus_bezierline(PyObject *self, PyObject* args); |
43,6 → 43,8 |
User test if an object with specified name really exists in |
the doc. Object name as param. |
03/29/2004 petr vanek |
ObjectName is now optional. When none set, search for selection... |
07/11/2004 pv |
*/ |
PyObject *scribus_objectexists(PyObject *self, PyObject* args); |
/trunk/Scribus/scribus/plugins/scriptplugin/cmdutil.h |
---|
16,4 → 16,3 |
PageItem* GetUniqueItem(QString name); |
#endif |
/trunk/Scribus/scribus/plugins/scriptplugin/cmdmani.h |
---|
17,6 → 17,9 |
PyObject *scribus_scalegroup(PyObject *self, PyObject* args); |
PyObject *scribus_loadimage(PyObject *self, PyObject* args); |
PyObject *scribus_scaleimage(PyObject *self, PyObject* args); |
/** (Un)Lock the object |
2004/7/10 pv.*/ |
PyObject *scribus_lockobject(PyObject *self, PyObject* args); |
PyObject *scribus_islocked(PyObject *self, PyObject* args); |
#endif |
/trunk/Scribus/scribus/plugins/scriptplugin/cmdmisc.cpp |
---|
9,7 → 9,10 |
{ |
int e; |
if (!PyArg_ParseTuple(args, "i", &e)) |
{ |
PyErr_SetString(PyExc_Exception, ERRPARAM + QString("SetRedraw(e)")); |
return NULL; |
} |
Py_INCREF(Py_None); |
if (!Carrier->HaveDoc) |
return Py_None; |
20,7 → 23,10 |
PyObject *scribus_fontnames(PyObject *self, PyObject* args) |
{ |
if (!PyArg_ParseTuple(args, "")) |
{ |
PyErr_SetString(PyExc_Exception, ERRPARAM + QString("GetFontNames()")); |
return NULL; |
} |
int cc2 = 0; |
SCFontsIterator it2(Carrier->Prefs.AvailFonts); |
for ( ; it2.current() ; ++it2) |
45,7 → 51,10 |
PyObject *scribus_xfontnames(PyObject *self, PyObject* args) |
{ |
if (!PyArg_ParseTuple(args, "")) |
{ |
PyErr_SetString(PyExc_Exception, ERRPARAM + QString("GetXFontNames()")); |
return NULL; |
} |
PyObject *l = PyList_New(Carrier->Prefs.AvailFonts.count()); |
SCFontsIterator it(Carrier->Prefs.AvailFonts); |
int cc = 0; |
74,7 → 83,10 |
int Size; |
bool ret = false; |
if (!PyArg_ParseTuple(args, "sssi", &Name, &FileName, &Sample, &Size)) |
{ |
PyErr_SetString(PyExc_Exception, ERRPARAM + QString("RenderFont(name, filename, sample, size)")); |
return NULL; |
} |
if (!Carrier->Prefs.AvailFonts.find(QString(Name))) |
return PyInt_FromLong(static_cast<long>(ret)); |
QString ts = QString(Sample); |
89,7 → 101,10 |
PyObject *scribus_getlayers(PyObject *self, PyObject* args) |
{ |
if (!PyArg_ParseTuple(args, "")) |
{ |
PyErr_SetString(PyExc_Exception, ERRPARAM + QString("GetLayers()")); |
return NULL; |
} |
PyObject *l; |
if (Carrier->HaveDoc) |
{ |
108,7 → 123,10 |
{ |
char *Name = ""; |
if (!PyArg_ParseTuple(args, "s", &Name)) |
{ |
PyErr_SetString(PyExc_Exception, ERRPARAM + QString("SetActiveLayer(layername)")); |
return NULL; |
} |
Py_INCREF(Py_None); |
if ((!Carrier->HaveDoc) || (Name == "")) |
return Py_None; |
129,7 → 147,10 |
PyObject *scribus_getactlayer(PyObject *self, PyObject* args) |
{ |
if (!PyArg_ParseTuple(args, "")) |
{ |
PyErr_SetString(PyExc_Exception, ERRPARAM + QString("GetActiveLayer()")); |
return NULL; |
} |
if (!Carrier->HaveDoc) |
return PyString_FromString(""); |
return PyString_FromString(Carrier->doc->Layers[Carrier->doc->ActiveLayer].Name); |
140,23 → 161,23 |
char *Name = ""; |
char *Layer = ""; |
if (!PyArg_ParseTuple(args, "s|s", &Layer, &Name)) |
{ |
PyErr_SetString(PyExc_Exception, ERRPARAM + QString("SentToLayer(layername [,obejctname])")); |
return NULL; |
} |
Py_INCREF(Py_None); |
if ((!Carrier->HaveDoc) || (Layer == "")) |
return Py_None; |
int i = GetItem(QString(Name)); |
if (i != -1) |
PageItem *i = GetUniqueItem(QString(Name)); |
if (i != NULL) |
{ |
PageItem *b = Carrier->doc->ActPage->Items.at(i); |
Carrier->doc->ActPage->SelectItemNr(i); |
i->OwnPage->SelectItemNr(i->ItemNr); |
for (uint lam=0; lam < Carrier->doc->Layers.count(); ++lam) |
{ |
if (Carrier->doc->Layers[lam].Name == QString(Layer)) |
{ |
b->LayerNr = static_cast<int>(lam); |
i->LayerNr = static_cast<int>(lam); |
break; |
} |
} |
} |
return Py_None; |
} |
166,7 → 187,10 |
char *Name = ""; |
int vis = 1; |
if (!PyArg_ParseTuple(args, "si", &Name, &vis)) |
{ |
PyErr_SetString(PyExc_Exception, ERRPARAM + QString("SetLayerVisible(layername, visible)")); |
return NULL; |
} |
Py_INCREF(Py_None); |
if ((!Carrier->HaveDoc) || (Name == "")) |
return Py_None; |
186,7 → 210,10 |
char *Name = ""; |
int vis = 1; |
if (!PyArg_ParseTuple(args, "si", &Name, &vis)) |
{ |
PyErr_SetString(PyExc_Exception, ERRPARAM + QString("SetLayerPrintable(layername, Printable)")); |
return NULL; |
} |
Py_INCREF(Py_None); |
if ((!Carrier->HaveDoc) || (Name == "")) |
return Py_None; |
205,7 → 232,10 |
{ |
char *Name = ""; |
if (!PyArg_ParseTuple(args, "s", &Name)) |
{ |
PyErr_SetString(PyExc_Exception, ERRPARAM + QString("IsLayerVisible(layername)")); |
return NULL; |
} |
if ((!Carrier->HaveDoc) || (Name == "")) |
return PyInt_FromLong(0L); |
int i = 0; |
224,7 → 254,10 |
{ |
char *Name = ""; |
if (!PyArg_ParseTuple(args, "s", &Name)) |
{ |
PyErr_SetString(PyExc_Exception, ERRPARAM + QString("IsLayerPrintable(layername)")); |
return NULL; |
} |
if ((!Carrier->HaveDoc) || (Name == "")) |
return PyInt_FromLong(0L); |
int i = 0; |
243,7 → 276,10 |
{ |
char *Name = ""; |
if (!PyArg_ParseTuple(args, "s", &Name)) |
{ |
PyErr_SetString(PyExc_Exception, ERRPARAM + QString("DeleteLayer(layername)")); |
return NULL; |
} |
Py_INCREF(Py_None); |
if ((!Carrier->HaveDoc) || (Name == "") || (Carrier->doc->Layers.count() == 1)) |
return Py_None; |
277,7 → 313,10 |
{ |
char *Name = ""; |
if (!PyArg_ParseTuple(args, "s", &Name)) |
{ |
PyErr_SetString(PyExc_Exception, ERRPARAM + QString("CreateLayer(layername)")); |
return NULL; |
} |
Py_INCREF(Py_None); |
if ((!Carrier->HaveDoc) || (Name == "")) |
return Py_None; |
297,7 → 336,9 |
PyObject *scribus_getlanguage(PyObject *self, PyObject* args) |
{ |
if (!PyArg_ParseTuple(args, "")) |
{ |
PyErr_SetString(PyExc_Exception, ERRPARAM + QString("GetGuiLanguage()")); |
return NULL; |
} |
return PyString_FromString(Carrier->GuiLanguage); |
} |
/trunk/Scribus/scribus/plugins/scriptplugin/cmddialog.cpp |
---|
1,12 → 1,16 |
#include <Python.h> |
#include "cmddialog.h" |
#include "cmdvar.h" |
#include "cmdutil.h" |
#include <qmessagebox.h> |
PyObject *scribus_newdocdia(PyObject *self, PyObject* args) |
{ |
if (!PyArg_ParseTuple(args, "")) |
{ |
PyErr_SetString(PyExc_Exception, ERRPARAM + QString("NewDocDialog()")); |
return NULL; |
} |
bool ret = Carrier->slotFileNew(); |
// qApp->processEvents(); |
return PyInt_FromLong(static_cast<long>(ret)); |
19,8 → 23,12 |
char *defName; |
int pre = 0; |
int mode = 0; |
return !PyArg_ParseTuple(args, "sss|ii", &caption, &filter, &defName, &pre, &mode) ? NULL : |
PyString_FromString(Carrier->CFileDialog(caption, filter, defName, static_cast<bool>(pre), static_cast<bool>(mode), 0, 0)); |
if (!PyArg_ParseTuple(args, "sss|ii", &caption, &filter, &defName, &pre, &mode)) |
{ |
PyErr_SetString(PyExc_Exception, ERRPARAM + QString("FileDialog(caption, filter, defaultname, pre, mode)")); |
return NULL; |
} |
PyString_FromString(Carrier->CFileDialog(caption, filter, defName, static_cast<bool>(pre), static_cast<bool>(mode), 0, 0)); |
} |
PyObject *scribus_mess(PyObject *self, PyObject* args) |
27,7 → 35,10 |
{ |
char *caption; |
if (!PyArg_ParseTuple(args, "s", &caption)) |
{ |
PyErr_SetString(PyExc_Exception, ERRPARAM + QString("StatusMessage(text)")); |
return NULL; |
} |
Carrier->FMess->setText(caption); |
return Py_None; |
} |
41,7 → 52,10 |
int butt2 = QMessageBox::NoButton; |
int butt3 = QMessageBox::NoButton; |
if (!PyArg_ParseTuple(args, "ssii|ii", &caption, &message, &ico, &butt1, &butt2, &butt3)) |
{ |
PyErr_SetString(PyExc_Exception, ERRPARAM + QString("MessageBox(caption, message, ico, butt1, butt2, butt3)")); |
return NULL; |
} |
QMessageBox mb(caption, message, ico, butt1, butt2, butt3, Carrier); |
return PyInt_FromLong(static_cast<long>(mb.exec())); |
} |
/trunk/Scribus/scribus/plugins/scriptplugin/scriptplugin.cpp |
---|
233,11 → 233,15 |
QString cres = QString(PyString_AsString(strres)); |
// just tell the truth :) |
if (cres.length() > 0) |
{ |
QClipboard *cp = QApplication::clipboard(); |
cp->setText(cres); |
QMessageBox::warning(Carrier, |
tr("Script error"), |
tr("If you are running an official script report it at <a href=\"http://bugs.scribus.net\">bugs.scribus.net</a> please.") |
+ "<br><br>" |
+ cres); |
+ "<pre>" |
+ cres + "</pre>" + tr("This message is in your clipboard too. Use Ctrl+V to paste it into bug tracker.")); |
} |
Py_EndInterpreter(state); |
PyEval_RestoreThread(stateo); |
Carrier->ScriptRunning = false; |
386,6 → 390,8 |
static PyMethodDef scribus_methods[] = { |
// petr's stuff |
{"LockObject", scribus_lockobject, METH_VARARGS}, |
{"IsLocked", scribus_islocked, METH_VARARGS}, |
{"ObjectExists", scribus_objectexists, METH_VARARGS}, |
{"GetPageItems", scribus_getpageitems, METH_VARARGS}, |
{"TextFlowsAroundFrame", scribus_textflow, METH_VARARGS}, |
/trunk/Scribus/scribus/plugins/svgimplugin/svgplugin.cpp |
---|
672,7 → 672,15 |
else if(subtransform[0] == "matrix") |
{ |
if(params.count() >= 6) |
result.setMatrix(params[0].toDouble(), params[1].toDouble(), params[2].toDouble(), params[3].toDouble(), params[4].toDouble(), params[5].toDouble()); |
{ |
double sx = params[0].toDouble(); |
if (sx == 0) |
sx = 1.0; |
double sy = params[3].toDouble(); |
if (sy == 0) |
sy = 1.0; |
result.setMatrix(sx, params[1].toDouble(), params[2].toDouble(), sy, params[4].toDouble(), params[5].toDouble()); |
} |
} |
} |
return result; |
/trunk/Scribus/scribus/plugins/newfromtemplateplugin/nftdialog.cpp |
---|
53,7 → 53,8 |
tnailGrid->setItemsMovable(false); |
popUp = new QPopupMenu(tnailGrid, "popUp"); |
popUp->insertItem(tr("Remove"), this, SLOT(removeTemplate())); |
popUp->insertItem(tr("&Remove"), this, SLOT(removeTemplate())); |
popUp->insertItem(tr("&Open"), this, SLOT(exitOK())); |
QWidget* dtTmp = new QWidget(splitter, "dtTmp", 0); |
dtTmp->setMinimumWidth(235); |
130,6 → 131,7 |
connect(okButton, SIGNAL(clicked()), this, SLOT(exitOK())); |
connect(cancelButton, SIGNAL(clicked()), this, SLOT(exitCancel())); |
connect(tnailGrid, SIGNAL(selectionChanged(QIconViewItem*)),this,SLOT(setInfo(QIconViewItem*))); |
connect(tnailGrid, SIGNAL(doubleClicked(QIconViewItem*)),this,SLOT(exitOK())); |
connect(tnailGrid, SIGNAL(rightButtonPressed(QIconViewItem*, const QPoint&)), |
this, SLOT(showPopup(QIconViewItem*, const QPoint&))); |
/trunk/Scribus/scribus/page.cpp |
---|
3715,6 → 3715,7 |
{ |
setGroupRect(); |
paintGroupRect(); |
emit HaveSel(b->PType); |
double x, y, w, h; |
getGroupRect(&x, &y, &w, &h); |
emit ItemPos(x, y); |
3721,8 → 3722,10 |
emit ItemGeom(w, h); |
} |
else |
{ |
emit HaveSel(b->PType); |
EmitValues(b); |
emit HaveSel(b->PType); |
} |
} |
} |
if (doku->AppMode == 6) |
/trunk/Scribus/scribus/libpdf/pdflib.cpp |
---|
807,6 → 807,21 |
} |
a++; |
} |
/* StartObj(ObjCounter); |
PutDoc("<<\n/Type /Halftone\n/HalftoneType 5\n"); |
PutDoc("/Cyan\n<<\n/Type /Halftone\n/HalftoneType 1\n/Frequency 50\n/Angle 45\n/SpotFunction /Round\n>>\n"); |
PutDoc("/Magenta\n<<\n/Type /Halftone\n/HalftoneType 1\n/Frequency 50\n/Angle 45\n/SpotFunction /Round\n>>\n"); |
PutDoc("/Yellow\n<<\n/Type /Halftone\n/HalftoneType 1\n/Frequency 50\n/Angle 45\n/SpotFunction /Round\n>>\n"); |
PutDoc("/Black\n<<\n/Type /Halftone\n/HalftoneType 1\n/Frequency 50\n/Angle 45\n/SpotFunction /Round\n>>\n"); |
PutDoc("/Default\n<<\n/Type /Halftone\n/HalftoneType 1\n/Frequency 50\n/Angle 45\n/SpotFunction /Round\n>>\n"); |
PutDoc(">>\nendobj\n"); |
ObjCounter++; |
StartObj(ObjCounter); |
HTName = ResNam+IToStr(ResCount); |
Transpar[HTName] = ObjCounter; |
PutDoc("<< /Type /ExtGState\n/HT "+IToStr(ObjCounter-1)+" 0 R\n>>\nendobj\n"); |
ResCount++; |
ObjCounter++; */ |
#ifdef HAVE_CMS |
if ((CMSuse) && (Options->UseProfiles)) |
{ |
1033,6 → 1048,7 |
struct Layer ll; |
ll.Drucken = false; |
ll.LNr = 0; |
// PutPage("/"+HTName+" gs\n"); |
QString name = "/"+pag->MPageNam.simplifyWhiteSpace().replace( QRegExp("\\s"), "" ); |
if (pag->MPageNam != "") |
{ |
/trunk/Scribus/scribus/libpdf/pdflib.h |
---|
172,6 → 172,7 |
QByteArray EncryKey; |
int Encrypt; |
int KeyLen; |
QString HTName; |
}; |
#endif |
/trunk/Scribus/scribus/scpreview.cpp |
---|
302,20 → 302,6 |
tmpx += tmp2.at(cxx)+tmp3; |
} |
} |
else |
{ |
tmpx += QString(QChar(QStoInt(it.attribute("CH")))) + "\t"; |
tmpx += DoFonts[it.attribute("CFONT")] + "\t"; |
tmpx += it.attribute("CSIZE") + "\t"; |
tmpx += it.attribute("CCOLOR") + "\t"; |
tmpx += it.attribute("CEXTRA") + "\t"; |
tmpx += it.attribute("CSHADE") + "\t"; |
tmpx += it.attribute("CSTYLE") + "\t"; |
tmpx += "0\t"; |
tmpx += it.attribute("CSTROKE","None") + "\t"; |
tmpx += it.attribute("CSHADE2","100") + "\t"; |
tmpx += it.attribute("CSCALE","100") + "\n"; |
} |
IT=IT.nextSibling(); |
} |
OB.Ptext = tmpx; |
/trunk/Scribus/scribus/po/scribus.de.ts |
---|
1701,23 → 1701,23 |
<name>DocInfos</name> |
<message> |
<source>Document Info</source> |
<translation>Information</translation> |
<translation type="obsolete">Information</translation> |
</message> |
<message> |
<source>Author:</source> |
<translation>Autor:</translation> |
<translation type="obsolete">Autor:</translation> |
</message> |
<message> |
<source>Title:</source> |
<translation>Titel:</translation> |
<translation type="obsolete">Titel:</translation> |
</message> |
<message> |
<source>Description:</source> |
<translation>Beschreibung:</translation> |
<translation type="obsolete">Beschreibung:</translation> |
</message> |
<message> |
<source>Keywords:</source> |
<translation>Schlüsselwörter:</translation> |
<translation type="obsolete">Schlüsselwörter:</translation> |
</message> |
<message> |
<source>OK</source> |
1729,16 → 1729,160 |
</message> |
<message> |
<source>This field can be embedded in the Scribus document for reference, as well as in the metadata of a PDF</source> |
<translation>Dieses Feld kann als Referenz in das Dokument eingebettet werden oder in den Meta-Daten der PDF's enthalten sein</translation> |
<translation type="obsolete">Dieses Feld kann als Referenz in das Dokument eingebettet werden oder in den Meta-Daten der PDF's enthalten sein</translation> |
</message> |
<message> |
<source>This field is for a brief description or abstract of the document. It is embedded in the PDF on export</source> |
<translation>Dieses Feld ist für eine kurze Beschreibung oder Zusammenfassung des Dokuments gedacht, sie wird beim PDF-Export mit in die PDF-Datei eingebunden</translation> |
<translation type="obsolete">Dieses Feld ist für eine kurze Beschreibung oder Zusammenfassung des Dokuments gedacht, sie wird beim PDF-Export mit in die PDF-Datei eingebunden</translation> |
</message> |
<message> |
<source>This field is for document keywords you wish to embed in a PDF, to assist searches and indexing of PDF files</source> |
<translation>In dieses Feld können Sie Stichworte eingeben, die sie in die PDF-Datei übernehmen wollen - das erleichtert das Suchen und Indizieren der PDF-Dateien</translation> |
<translation type="obsolete">In dieses Feld können Sie Stichworte eingeben, die sie in die PDF-Datei übernehmen wollen - das erleichtert das Suchen und Indizieren der PDF-Dateien</translation> |
</message> |
<message> |
<source>Document Information</source> |
<translation>Dokumentinformationen</translation> |
</message> |
<message> |
<source>&Title:</source> |
<translation>&Titel:</translation> |
</message> |
<message> |
<source>&Author:</source> |
<translation>&Autor:</translation> |
</message> |
<message> |
<source>&Keywords:</source> |
<translation>&Stichworte:</translation> |
</message> |
<message> |
<source>Descri&ption:</source> |
<translation>Beschrei&bung:</translation> |
</message> |
<message> |
<source>P&ublisher:</source> |
<translation>&Herausgeber:</translation> |
</message> |
<message> |
<source>&Contributors:</source> |
<translation>&Mitarbeiter:</translation> |
</message> |
<message> |
<source>Dat&e:</source> |
<translation>&Datum:</translation> |
</message> |
<message> |
<source>T&ype:</source> |
<translation>&Typ:</translation> |
</message> |
<message> |
<source>F&ormat:</source> |
<translation>&Format:</translation> |
</message> |
<message> |
<source>Identi&fier:</source> |
<translation>&Identifikation:</translation> |
</message> |
<message> |
<source>&Source:</source> |
<translation>&Quelle:</translation> |
</message> |
<message> |
<source>&Language:</source> |
<translation>&Sprache:</translation> |
</message> |
<message> |
<source>&Relation:</source> |
<translation>&Beziehung:</translation> |
</message> |
<message> |
<source>Co&verage:</source> |
<translation>&Gültigkeitsbereich:</translation> |
</message> |
<message> |
<source>Ri&ghts:</source> |
<translation>&Rechte:</translation> |
</message> |
<message> |
<source>&Document</source> |
<translation>&Dokument</translation> |
</message> |
<message> |
<source>Further &Information</source> |
<translation>Weitere &Informationen</translation> |
</message> |
<message> |
<source>The person or organisation primarily responsible for making the content of the document. |
This field can be embedded in the Scribus document for reference, as well as in the metadata of a PDF</source> |
<translation>Die Person oder Organisation, die vorrangig verantwortlich für den Inhalt des Dokuments ist. |
Diese Feld kann sowohl in das Scribus-Dokument als auch in die Meta-Daten einer PDF-Datei eingebettet werden</translation> |
</message> |
<message> |
<source>A name given to the document. |
This field can be embedded in the Scribus document for reference, as well as in the metadata of a PDF</source> |
<translation>Ein Name für das Dokment |
Diese Feld kann sowohl in das Scribus-Dokument als auch in die Meta-Daten einer PDF-Datei eingebettet werden</translation> |
</message> |
<message> |
<source>An account of the content of the document. |
This field is for a brief description or abstract of the document. It is embedded in the PDF on export</source> |
<translation>Ein Abriss des Inhalts. |
Hier kann eine kurze Beschreibung oder Zusammenfassung stehen. Sie wird in die PDF-Datei exportiert</translation> |
</message> |
<message> |
<source>The topic of the content of the document. |
This field is for document keywords you wish to embed in a PDF, to assist searches and indexing of PDF files</source> |
<translation>Worte, die den Inhalt des Dokuments beschreiben. |
Der Inhalt dieses Feldes wird in die PDF-Datei exportiert und hilft Ihnen, PDF-Dateien zu indizieren und und wiederzufinden</translation> |
</message> |
<message> |
<source>A person or organisation responsible for making the document available</source> |
<translation>Eine Person oder Organisation, die für die Veröffentlichung des Dokuments verantwortlich ist</translation> |
</message> |
<message> |
<source>A person or organisation responsible for making contributions to the content of the document</source> |
<translation>Eine Person oder Organisation, die bei dem Dokument mitgearbeitet hat</translation> |
</message> |
<message> |
<source>A date associated with an event in the life cycle of the document, in YYYY-MM-DD format, as per ISO 8601</source> |
<translation>Ein Datum, das mit der Entstehung des Dokuments verbunden ist, nach ISO 8601 im Format YYYY-MM-DD </translation> |
</message> |
<message> |
<source>The nature or genre of the content of the document, eg. categories, functions, genres, etc</source> |
<translation>Die Gattung oder der Typ des Dokuments, z.B. Kategorien, Funktionen, Arten usw</translation> |
</message> |
<message> |
<source>The physical or digital manifestation of the document. Media type and dimensions would be worth noting. |
RFC2045,RFC2046 for MIME types are also useful here</source> |
<translation>Die physische oder digitale Veröffentlichungsform des Dokuments. Abmessung und Medien-Typ können hier notiert werden. |
Für MIME-Typen sind auch RFC2045 und RFC2046 gebräuchlich</translation> |
</message> |
<message> |
<source>An unambiguous reference to the document within a given context such as ISBN or URI</source> |
<translation>Eine eindeutige Referenz zu dem Dokument in einem gegebenen Kontext wie ISBN oder URI</translation> |
</message> |
<message> |
<source>A reference to a document from which the present document is derived, eg. ISDN or URI</source> |
<translation>Eine Referenz zu einem Dokument, von dem sich das aktuelle Dokument ableitet, z.B. ISBN oder URI</translation> |
</message> |
<message> |
<source>The language in which the content of the document is written, usually a ISO-639 language code |
optionally suffixed with a hypen and an ISO-3166 country code, eg. en-GB, fr-CH</source> |
<translation>Die Sprache , in der der Inhalt des Dokuments geschrieben ist, normalerweise ein ISO-639 Sprachcode, |
optional ergänzt durch ein Bindestrich und den ISO-3166 Ländercode, wie z.B. en-GB oder fr-CH</translation> |
</message> |
<message> |
<source>A reference to a related document, possibly using a formal identifier such as a ISBN or URI</source> |
<translation>Eine Referenz zu einem ähnlichen Dokument, wenn möglich eine formale Identifikation wie ISBN oder URI benutzen</translation> |
</message> |
<message> |
<source>The extent or scope of the content of the document, possibly including location, time and jurisdiction ranges</source> |
<translation type="unfinished">Der Ausbreitungsbereich des Dokuments, wenn möglich mit Ort, Zeit und Gerichtsbarkeit</translation> |
</message> |
<message> |
<source>Information about rights held in and over the document, eg. copyright, patent or trademark</source> |
<translation>Informationen über Rechte in dem oder über das Dokument, z.B. Copyright, Patente oder Handelsmarken</translation> |
</message> |
</context> |
<context> |
<name>Druck</name> |
1796,11 → 1940,11 |
</message> |
<message> |
<source>Print last page first</source> |
<translation>Drucke letzte Seite zuerst</translation> |
<translation type="obsolete">Drucke letzte Seite zuerst</translation> |
</message> |
<message> |
<source>Print first page first</source> |
<translation>Drucke erste Seite zuerst</translation> |
<translation type="obsolete">Drucke erste Seite zuerst</translation> |
</message> |
<message> |
<source>Number of copies:</source> |
8053,7 → 8197,7 |
</message> |
<message> |
<source>Insert...</source> |
<translation type="unfinished">Einfügen...</translation> |
<translation>Einfügen...</translation> |
</message> |
<message> |
<source>Delete...</source> |
8908,7 → 9052,7 |
</message> |
<message> |
<source>&Insert...</source> |
<translation>Ein&fügen...</translation> |
<translation>EIn&fügen...</translation> |
</message> |
<message> |
<source>&Delete...</source> |
9992,7 → 10136,7 |
</message> |
<message> |
<source>Insert Freehand Line</source> |
<translation>Freihandlinie einfügen</translation> |
<translation>Freihand Linie einfügen</translation> |
</message> |
<message> |
<source>Rotate Item</source> |
/trunk/Scribus/scribus/po/scribus.pl_PL.ts |
---|
1206,11 → 1206,11 |
</message> |
<message> |
<source>Rendering Intents</source> |
<translation>Metody konwersji</translation> |
<translation>Metody renderingu</translation> |
</message> |
<message> |
<source>Perceptual</source> |
<translation>Percepcja</translation> |
<translation>Spostrzeżeniowa</translation> |
</message> |
<message> |
<source>Relative Colorimetric</source> |
1222,7 → 1222,7 |
</message> |
<message> |
<source>Absolute Colorimetric</source> |
<translation>Absolutnie kolorometryczna</translation> |
<translation>Całkowicie kolorometryczna</translation> |
</message> |
<message> |
<source>Simulate Printer on the Screen</source> |
1230,7 → 1230,7 |
</message> |
<message> |
<source>Mark Colors out of Gamut</source> |
<translation>Zaznacz kolory spoza przestrzeni barw</translation> |
<translation>Zaznacz kolory spoza palety barw</translation> |
</message> |
<message> |
<source>Use Blackpoint Compensation</source> |
1297,14 → 1297,14 |
<message> |
<source>Default rendering intent for your monitor. Unless you know why to change it, |
Relative Colorimetric or Perceptual should be chosen.</source> |
<translation>Domyślna metoda konwersji dla twojego monitora. Wybierz metodę |
relatywnie kolorometryczną lub percepcję, chyba że wiesz, dlaczego chcesz to zmienić.</translation> |
<translation>Domyślna metoda renderingu dla twojego monitora. Wybierz metodę |
względnie kolorometryczną lub spostrzeżeniową, chyba że wiesz, dlaczego chcesz to zmienić.</translation> |
</message> |
<message> |
<source>Default rendering intent for your printer. Unless you know why to change it, |
Relative Colorimetric or Perceptual should be chosen.</source> |
<translation>Domyślna metoda konwersji dla twojej drukarki. Wybierz metodę |
relatywnie kolorometryczną lub percepcję, chyba że wiesz, dlaczego chcesz to zmienić.</translation> |
<translation>Domyślna metoda renderingu dla twojej drukarki. Wybierz metodę |
względnie kolorometryczną lub spostrzeżeniową, chyba że wiesz, dlaczego chcesz to zmienić.</translation> |
</message> |
<message> |
<source>Enable 'soft proofing' of how your document colors will print, |
1620,7 → 1620,7 |
<translation>Panel ten wyświetla opcje CUPS dla druku. |
Opcje te zależą od zainstalowanego sterownika drukarki. |
Aby upewnić się, czy wbudowana została obsługa CUPS, należy zajrzeć pod Pomoc > O Scribusie |
Sprawdź, czy identyfikator kompilacji zawiera C-C-C. Symbole te oznaczają wsparcie dla C=CUPS C=littlecms T=TIFF |
Sprawdź, czy identyfikator kompilacji zawiera C-C-T. Symbole te oznaczają wsparcie dla C=CUPS C=littlecms T=TIFF |
Brak wparcia dla danej biblioteki symbolizuje znak *</translation> |
</message> |
</context> |
1738,23 → 1738,23 |
<name>DocInfos</name> |
<message> |
<source>Document Info</source> |
<translation>Informacja o dokumencie</translation> |
<translation type="obsolete">Informacja o dokumencie</translation> |
</message> |
<message> |
<source>Author:</source> |
<translation>Autor:</translation> |
<translation type="obsolete">Autor:</translation> |
</message> |
<message> |
<source>Title:</source> |
<translation>Tytuł:</translation> |
<translation type="obsolete">Tytuł:</translation> |
</message> |
<message> |
<source>Description:</source> |
<translation>Opis:</translation> |
<translation type="obsolete">Opis:</translation> |
</message> |
<message> |
<source>Keywords:</source> |
<translation>Słowa kluczowe:</translation> |
<translation type="obsolete">Słowa kluczowe:</translation> |
</message> |
<message> |
<source>OK</source> |
1766,16 → 1766,160 |
</message> |
<message> |
<source>This field can be embedded in the Scribus document for reference, as well as in the metadata of a PDF</source> |
<translation>Pole to może zarówno być dołączone do dokumentu Scribusa jako dodatkowa informacja, jak też jako metadane do dokumentu PDF</translation> |
<translation type="obsolete">Pole to może zarówno być dołączone do dokumentu Scribusa jako dodatkowa informacja, jak też jako metadane do dokumentu PDF</translation> |
</message> |
<message> |
<source>This field is for a brief description or abstract of the document. It is embedded in the PDF on export</source> |
<translation>To pole służy do krótkiego opisu lub streszczenia dokumentu. Zostanie ono włączone do PDF w trakcie eksportu</translation> |
<translation type="obsolete">To pole służy do krótkiego opisu lub streszczenia dokumentu. Zostanie ono włączone do PDF w trakcie eksportu</translation> |
</message> |
<message> |
<source>This field is for document keywords you wish to embed in a PDF, to assist searches and indexing of PDF files</source> |
<translation>To pole przeznaczone jest na słowa kluczowe, które zostaną włączone do PDF, aby ułatwić przeszukiwanie i indeksację plików</translation> |
<translation type="obsolete">To pole przeznaczone jest na słowa kluczowe, które zostaną włączone do PDF, aby ułatwić przeszukiwanie i indeksację plików</translation> |
</message> |
<message> |
<source>Document Information</source> |
<translation>Informacja o dokumencie</translation> |
</message> |
<message> |
<source>&Title:</source> |
<translation>&Tytuł:</translation> |
</message> |
<message> |
<source>&Author:</source> |
<translation>&Autor:</translation> |
</message> |
<message> |
<source>&Keywords:</source> |
<translation>&Słowa kluczowe:</translation> |
</message> |
<message> |
<source>Descri&ption:</source> |
<translation>&Opis:</translation> |
</message> |
<message> |
<source>P&ublisher:</source> |
<translation>&Wydawca:</translation> |
</message> |
<message> |
<source>&Contributors:</source> |
<translation>Inni &autorzy:</translation> |
</message> |
<message> |
<source>Dat&e:</source> |
<translation>&Data:</translation> |
</message> |
<message> |
<source>T&ype:</source> |
<translation>&Typ:</translation> |
</message> |
<message> |
<source>F&ormat:</source> |
<translation>&Format:</translation> |
</message> |
<message> |
<source>Identi&fier:</source> |
<translation>Id&entyfikator:</translation> |
</message> |
<message> |
<source>&Source:</source> |
<translation>Ź&ródło:</translation> |
</message> |
<message> |
<source>&Language:</source> |
<translation>&Język:</translation> |
</message> |
<message> |
<source>&Relation:</source> |
<translation>&Odniesienie:</translation> |
</message> |
<message> |
<source>Co&verage:</source> |
<translation>&Zakres:</translation> |
</message> |
<message> |
<source>Ri&ghts:</source> |
<translation>&Prawa:</translation> |
</message> |
<message> |
<source>&Document</source> |
<translation>&Dokument</translation> |
</message> |
<message> |
<source>Further &Information</source> |
<translation>Pozostałe &informacje</translation> |
</message> |
<message> |
<source>The person or organisation primarily responsible for making the content of the document. |
This field can be embedded in the Scribus document for reference, as well as in the metadata of a PDF</source> |
<translation>Osoba lub organizacja odpowiadająca za zawartość dokumentu. |
Pole to może być dodane do dokumentu Scribusa jako dodatkowa informacja, jak też zagnieżdżone jako metadane w pliku PDF </translation> |
</message> |
<message> |
<source>A name given to the document. |
This field can be embedded in the Scribus document for reference, as well as in the metadata of a PDF</source> |
<translation>Nazwa nadana dokumentowi. |
Pole to może być dodane do dokumentu Scribusa jako dodatkowa informacja, jak też zagnieżdżone jako metadane w pliku PDF </translation> |
</message> |
<message> |
<source>An account of the content of the document. |
This field is for a brief description or abstract of the document. It is embedded in the PDF on export</source> |
<translation>Opis zawartości dokumentu. |
Pole to może być dodane do dokumentu Scribusa jako dodatkowa informacja, jak też zagnieżdżone jako metadane w pliku PDF </translation> |
</message> |
<message> |
<source>The topic of the content of the document. |
This field is for document keywords you wish to embed in a PDF, to assist searches and indexing of PDF files</source> |
<translation>Tematyka, której poświęcona jest zawartość dokumentu. |
Pole to może być dodane do dokumentu Scribusa jako dodatkowa informacja, jak też zagnieżdżone jako metadane w pliku PDF </translation> |
</message> |
<message> |
<source>A person or organisation responsible for making the document available</source> |
<translation>Osoba lub organizacja odpowiedzialna za opublikowanie dokumentu</translation> |
</message> |
<message> |
<source>A person or organisation responsible for making contributions to the content of the document</source> |
<translation>Osoby lub organizacje, które uczestniczyły w tworzeniu zawartości dokumentu </translation> |
</message> |
<message> |
<source>A date associated with an event in the life cycle of the document, in YYYY-MM-DD format, as per ISO 8601</source> |
<translation>Data jakiegoś wydarzenia w cyklu życia dokumentu w formacie YYYY-MM-DD, zgodnie z ISO 8601</translation> |
</message> |
<message> |
<source>The nature or genre of the content of the document, eg. categories, functions, genres, etc</source> |
<translation>Natura albo rodzaj zawartości dokumentu, np. kategorie, funkcje, gatunki</translation> |
</message> |
<message> |
<source>The physical or digital manifestation of the document. Media type and dimensions would be worth noting. |
RFC2045,RFC2046 for MIME types are also useful here</source> |
<translation>Fizyczna albo cyfrowa forma dokumentu. Tutaj warto podać typ nośnika i rozmiar dokumentu. |
Przydatne informacje na temat typów MIME znajdują się w RFC2045 i RFC2046</translation> |
</message> |
<message> |
<source>An unambiguous reference to the document within a given context such as ISBN or URI</source> |
<translation>Jednoznaczny odnośnik do dokumentu w danym kontekście, jak np. ISBN lub URI</translation> |
</message> |
<message> |
<source>A reference to a document from which the present document is derived, eg. ISDN or URI</source> |
<translation>Odnośnik do dokumentu, na podstawie którego powstał aktualny dokument, np. ISBN lub URI</translation> |
</message> |
<message> |
<source>The language in which the content of the document is written, usually a ISO-639 language code |
optionally suffixed with a hypen and an ISO-3166 country code, eg. en-GB, fr-CH</source> |
<translation>Język zawartości dokumentu, zazwyczaj podany jako kod językowy ISO-639, |
opcjonalnie uzupełniony o myślnik i kod kraju zgodny z ISO-3166, np pl-PL, fr-CH</translation> |
</message> |
<message> |
<source>A reference to a related document, possibly using a formal identifier such as a ISBN or URI</source> |
<translation>Odnośnik do powiązanego dokumentu, najlepiej w formie identyfikatora takiego jako ISBN lub URI</translation> |
</message> |
<message> |
<source>The extent or scope of the content of the document, possibly including location, time and jurisdiction ranges</source> |
<translation>Zakres i zasięg zawartości dokumentu, najlepiej z podaniem miejsca, czasu i jurysdykcji</translation> |
</message> |
<message> |
<source>Information about rights held in and over the document, eg. copyright, patent or trademark</source> |
<translation>Informacja o prawach obawiązujących dla tego dokumentu, np. prawach autorskich, patentach i znakach towarowych</translation> |
</message> |
</context> |
<context> |
<name>Druck</name> |
1817,11 → 1961,11 |
</message> |
<message> |
<source>To page:</source> |
<translation>Do strony:</translation> |
<translation type="obsolete">Do strony:</translation> |
</message> |
<message> |
<source>From page:</source> |
<translation>Od strony:</translation> |
<translation type="obsolete">Od strony:</translation> |
</message> |
<message> |
<source>Print range</source> |
1833,11 → 1977,11 |
</message> |
<message> |
<source>Print last page first</source> |
<translation>Zacznij druk od ostatniej strony</translation> |
<translation type="obsolete">Zacznij druk od ostatniej strony</translation> |
</message> |
<message> |
<source>Print first page first</source> |
<translation>Zacznij druk od pierwszej strony</translation> |
<translation type="obsolete">Zacznij druk od pierwszej strony</translation> |
</message> |
<message> |
<source>Number of copies:</source> |
1911,6 → 2055,14 |
<source>Print current page</source> |
<translation>Drukuj aktualną stronę</translation> |
</message> |
<message> |
<source>Insert a comma separated list of tokens where |
a token can be * for all the pages, 1-5 for |
a range of pages or a single page number.</source> |
<translation>Wpisz rozdzieloną przecinkami listę wartości, |
gdzie * oznacza wszystkie strony, 1-5 zakres stron |
a pojedynczy numer oznacza numer strony.</translation> |
</message> |
</context> |
<context> |
<name>EPSPlug</name> |
3126,6 → 3278,22 |
<source>Cancel</source> |
<translation>Anuluj</translation> |
</message> |
<message> |
<source> pt</source> |
<translation>pt</translation> |
</message> |
<message> |
<source> mm</source> |
<translation>mm</translation> |
</message> |
<message> |
<source> in</source> |
<translation>in</translation> |
</message> |
<message> |
<source> p</source> |
<translation>p</translation> |
</message> |
</context> |
<context> |
<name>Measurements</name> |
3213,11 → 3381,11 |
<name>MergeDoc</name> |
<message> |
<source>Import a Page</source> |
<translation>Importuj stronę</translation> |
<translation type="obsolete">Importuj stronę</translation> |
</message> |
<message> |
<source>Document to load:</source> |
<translation>Z dokumentu:</translation> |
<translation type="obsolete">Z dokumentu:</translation> |
</message> |
<message> |
<source>Change...</source> |
3225,11 → 3393,11 |
</message> |
<message> |
<source>Document contains: 0 Page(s)</source> |
<translation>Dokument zawiera: 0 stron</translation> |
<translation type="obsolete">Dokument zawiera: 0 stron</translation> |
</message> |
<message> |
<source>Import Page Nr:</source> |
<translation>Importuj stronę nr:</translation> |
<translation type="obsolete">Importuj stronę nr:</translation> |
</message> |
<message> |
<source>Import</source> |
3253,8 → 3421,56 |
</message> |
<message> |
<source>Document contains: %1 Page(s)</source> |
<translation>Dokument zawiera: %1 stron</translation> |
<translation type="obsolete">Dokument zawiera: %1 stron</translation> |
</message> |
<message> |
<source>Import Template</source> |
<translation>Importuj szablon</translation> |
</message> |
<message> |
<source>Import Page(s)</source> |
<translation>Importuj strony</translation> |
</message> |
<message> |
<source>From Document:</source> |
<translation>Z dokumentu:</translation> |
</message> |
<message> |
<source>Import Page(s):</source> |
<translation>Importuj strony:</translation> |
</message> |
<message> |
<source>Insert a comma separated list of tokens where |
a token can be * for all the pages, 1-5 for |
a range of pages or a single page number.</source> |
<translation>Wpisz rozdzieloną przecinkami listę wartości, |
gdzie * oznacza wszystkie strony, 1-5 zakres stron |
a pojedynczy numer oznacza numer strony.</translation> |
</message> |
<message> |
<source> from 0</source> |
<translation>od 0</translation> |
</message> |
<message> |
<source>Create Page(s)</source> |
<translation>Utwórz strony</translation> |
</message> |
<message> |
<source>before Page</source> |
<translation>przed stroną</translation> |
</message> |
<message> |
<source>after Page</source> |
<translation>po stronie</translation> |
</message> |
<message> |
<source>at End</source> |
<translation>na końcu dokumentu</translation> |
</message> |
<message> |
<source> from %1</source> |
<translation>od %1</translation> |
</message> |
</context> |
<context> |
<name>MovePages</name> |
3501,11 → 3717,11 |
</message> |
<message> |
<source>Rendering Intent:</source> |
<translation>Metoda konwersji:</translation> |
<translation>Metoda renderingu:</translation> |
</message> |
<message> |
<source>Perceptual</source> |
<translation>Percepcja</translation> |
<translation>Spostrzeżeniowa</translation> |
</message> |
<message> |
<source>Relative Colorimetric</source> |
3517,7 → 3733,7 |
</message> |
<message> |
<source>Absolute Colorimetric</source> |
<translation>Absolutnie kolorometryczna</translation> |
<translation>Całkowicie kolorometryczna</translation> |
</message> |
<message> |
<source>Left Point</source> |
3545,7 → 3761,7 |
</message> |
<message> |
<source>Bevel Join</source> |
<translation>Skośny</translation> |
<translation>Ścięty</translation> |
</message> |
<message> |
<source>Round Join</source> |
3999,7 → 4215,7 |
</message> |
<message> |
<source>Rendering intent for the image</source> |
<translation>Metoda konwersji dla obrazka</translation> |
<translation>Metoda renderingu dla obrazka</translation> |
</message> |
<message> |
<source>Style:</source> |
4062,7 → 4278,7 |
</message> |
<message> |
<source>Bevel Join</source> |
<translation>Skośny</translation> |
<translation>Ścięty</translation> |
</message> |
<message> |
<source>Round Join</source> |
4585,11 → 4801,11 |
</message> |
<message> |
<source>From:</source> |
<translation>Od:</translation> |
<translation type="obsolete">Od:</translation> |
</message> |
<message> |
<source>to:</source> |
<translation>do:</translation> |
<translation type="obsolete">do:</translation> |
</message> |
<message> |
<source>File Options</source> |
4857,11 → 5073,11 |
</message> |
<message> |
<source>Rendering-Intent:</source> |
<translation>Metoda konwersji::</translation> |
<translation>Metoda renderingu:</translation> |
</message> |
<message> |
<source>Perceptual</source> |
<translation>Percepcja</translation> |
<translation>Spostrzeżeniowa</translation> |
</message> |
<message> |
<source>Relative Colorimetric</source> |
4873,7 → 5089,7 |
</message> |
<message> |
<source>Absolute Colorimetric</source> |
<translation>Absolutnie kolorometryczna</translation> |
<translation>Całkowicie kolorometryczna</translation> |
</message> |
<message> |
<source>Images:</source> |
4985,11 → 5201,11 |
</message> |
<message> |
<source>First page to export when exporting a range</source> |
<translation>Pierwsza strona zakresu stron przeznaczonego do eskportu</translation> |
<translation type="obsolete">Pierwsza strona zakresu stron przeznaczonego do eskportu</translation> |
</message> |
<message> |
<source>Last page to export when exporting a range</source> |
<translation>Ostatnia strona zakresu stron przeznaczonego do eksportu</translation> |
<translation type="obsolete">Ostatnia strona zakresu stron przeznaczonego do eksportu</translation> |
</message> |
<message> |
<source>Determines the PDF compatibility. |
5342,7 → 5558,7 |
</message> |
<message> |
<source>Rendering intent for solid colors</source> |
<translation>Metoda konwersji dla jednolitych kolorów</translation> |
<translation>Metoda renderingu dla jednolitych kolorów</translation> |
</message> |
<message> |
<source>Color profile for images</source> |
5350,7 → 5566,7 |
</message> |
<message> |
<source>Rendering intent for images</source> |
<translation>Metoda konwersji dla obrazków</translation> |
<translation>Metoda renderingu dla obrazków</translation> |
</message> |
<message> |
<source>Output profile for printing. If possible, get some guidance from your printer on profile selection.</source> |
5441,6 → 5657,18 |
<translation>Dozwolone dodawanie adnotacji i pól do dokumentu PDF. |
W przypadku braku zakreślenie edycja adnotacji i pól zostanie uniemożliwiona.</translation> |
</message> |
<message> |
<source>Choose Pages</source> |
<translation>Wybierz strony</translation> |
</message> |
<message> |
<source>Insert a comma separated list of tokens where |
a token can be * for all the pages, 1-5 for |
a range of pages or a single page number.</source> |
<translation>Wpisz rozdzieloną przecinkami listę wartości, |
gdzie * oznacza wszystkie strony, 1-5 zakres stron |
a pojedynczy numer oznacza numer strony.</translation> |
</message> |
</context> |
<context> |
<name>PPreview</name> |
5545,7 → 5773,7 |
</message> |
<message> |
<source>Hide Margins</source> |
<translation>Ukryj marginesy</translation> |
<translation type="obsolete">Ukryj marginesy</translation> |
</message> |
<message> |
<source>Show Margins</source> |
5553,7 → 5781,7 |
</message> |
<message> |
<source>Hide Frames</source> |
<translation>Ukryj ramki</translation> |
<translation type="obsolete">Ukryj ramki</translation> |
</message> |
<message> |
<source>Show Frames</source> |
5561,7 → 5789,7 |
</message> |
<message> |
<source>Hide Images</source> |
<translation>Ukryj obrazki</translation> |
<translation type="obsolete">Ukryj obrazki</translation> |
</message> |
<message> |
<source>Show Images</source> |
5569,7 → 5797,7 |
</message> |
<message> |
<source>Hide Grid</source> |
<translation>Ukryj siatkę</translation> |
<translation type="obsolete">Ukryj siatkę</translation> |
</message> |
<message> |
<source>Show Grid</source> |
5577,7 → 5805,7 |
</message> |
<message> |
<source>Hide Guides</source> |
<translation>Wyświetlaj linie pomocnicze</translation> |
<translation type="obsolete">Wyświetlaj linie pomocnicze</translation> |
</message> |
<message> |
<source>Show Guides</source> |
5701,7 → 5929,7 |
</message> |
<message> |
<source>Send to Scrapbook</source> |
<translation>Przesuń do biblioteki</translation> |
<translation>Dodaj do biblioteki</translation> |
</message> |
<message> |
<source>Send to Layer</source> |
5717,7 → 5945,7 |
</message> |
<message> |
<source>Outlines</source> |
<translation>Ścieżki</translation> |
<translation>Krzywe</translation> |
</message> |
<message> |
<source>Bezier Curve</source> |
5797,7 → 6025,7 |
</message> |
<message> |
<source>Hide Baseline Grid</source> |
<translation>Ukryj linie pisma</translation> |
<translation type="obsolete">Ukryj linie pisma</translation> |
</message> |
<message> |
<source>Show Baseline Grid</source> |
7467,7 → 7695,7 |
</message> |
<message> |
<source>&Fonts Preview</source> |
<translation> &Podgląd czcionek</translation> |
<translation>&Podgląd czcionek</translation> |
</message> |
<message> |
<source>&Insert Special</source> |
8898,7 → 9126,7 |
</message> |
<message> |
<source>Insert &Page...</source> |
<translation>&Wklej stronę...</translation> |
<translation type="obsolete">&Wklej stronę...</translation> |
</message> |
<message> |
<source>&Import</source> |
9054,7 → 9282,7 |
</message> |
<message> |
<source>C&onvert to Outlines</source> |
<translation>Zamień na ś&cieżki</translation> |
<translation>Za&mień na krzywe</translation> |
</message> |
<message> |
<source>&Insert...</source> |
9090,15 → 9318,15 |
</message> |
<message> |
<source>Hide &Margins</source> |
<translation>&Ukryj marginesy</translation> |
<translation type="obsolete">&Ukryj marginesy</translation> |
</message> |
<message> |
<source>Hide &Frames</source> |
<translation>Ukryj &ramki</translation> |
<translation type="obsolete">Ukryj &ramki</translation> |
</message> |
<message> |
<source>Hide &Images</source> |
<translation>Ukryj &obrazki</translation> |
<translation type="obsolete">Ukryj &obrazki</translation> |
</message> |
<message> |
<source>Show &Grid</source> |
9110,7 → 9338,7 |
</message> |
<message> |
<source>Hide G&uides</source> |
<translation>Ukryj linie &pomocnicze</translation> |
<translation type="obsolete">Ukryj linie &pomocnicze</translation> |
</message> |
<message> |
<source>Sna&p to Guides</source> |
9286,16 → 9514,48 |
</message> |
<message> |
<source>Hide &Grid</source> |
<translation>Ukryj &siatkę</translation> |
<translation type="obsolete">Ukryj &siatkę</translation> |
</message> |
<message> |
<source>Hide &Baseline Grid</source> |
<translation>Ukryj linie &pisma</translation> |
<translation type="obsolete">Ukryj linie &pisma</translation> |
</message> |
<message> |
<source>Ghostscript : You cannot use EPS Images</source> |
<translation>Ghostscript: nie możesz użyć grafik EPS</translation> |
</message> |
<message> |
<source>Import &Page(s)...</source> |
<translation>Importuj st&rony...</translation> |
</message> |
<message> |
<source>Importing Pages...</source> |
<translation>Import stron w toku...</translation> |
</message> |
<message> |
<source>Import Page(s)</source> |
<translation>Importuj strony</translation> |
</message> |
<message> |
<source><p>You are trying to import more pages than there are available in the current document counting from the active page.</p>Choose one of the following:<br><ul><li><b>Create</b> missing pages</li><li><b>Import</b> pages until the last page</li><li><b>Cancel</b></li></ul><br></source> |
<translation><p>Próbujesz zaimportować więcej stron, niż jest dostępnych licząc od aktywnej strony. </p>Wybierz jedną z poniższych możliwości:<br><ul><li><b>Utwórz</b> brakujące strony</li><li><b>Importuj</b> strony aż do ostatniej strony</li><li><b>Anuluj</b></li></ul><br></translation> |
</message> |
<message> |
<source>Create</source> |
<translation>Utwórz</translation> |
</message> |
<message> |
<source>Import</source> |
<translation>Importuj</translation> |
</message> |
<message> |
<source>Import done</source> |
<translation>Import zakończony</translation> |
</message> |
<message> |
<source>Found nothing to import</source> |
<translation>Nie znaleziono niczego do zaimportowania</translation> |
</message> |
</context> |
<context> |
<name>ScribusDoc</name> |
10296,6 → 10556,10 |
<source>Author</source> |
<translation>Autor</translation> |
</message> |
<message> |
<source>Remove</source> |
<translation>Usuń</translation> |
</message> |
</context> |
<context> |
<name>satdialog</name> |
/trunk/Scribus/scribus/scribusXml.h |
---|
21,12 → 21,16 |
ScriXmlDoc() {}; |
~ScriXmlDoc() {}; |
QString ReadDatei(QString fileName); |
void GetItemProps(bool newVersion, QDomElement *obj, struct CLBuf *OB); |
void ScriXmlDoc::SetItemProps(QDomElement *ob, PageItem* item); |
QString GetItemText(QDomElement *it, ScribusDoc *doc, preV *Prefs, bool VorLFound, bool impo); |
QString AskForFont(SCFonts &avail, QString fStr, preV *Prefs, ScribusDoc *doc); |
bool ReadLStyles(QString fileName, QMap<QString,multiLine> *Sty); |
void GetStyle(QDomElement *pg, struct StVorL *vg, QValueList<StVorL> &Vorlagen, ScribusDoc* doc, preV *Prefs, bool fl); |
bool ReadStyles(QString fileName, ScribusDoc* doc, preV *Prefs); |
bool ReadColors(QString fileName); |
bool ReadPageCount(QString fileName, int *num1, int *num2); |
bool ReadPage(QString fileName, SCFonts &avail, ScribusDoc *doc, ScribusView *view, int PageToLoad, |
bool Mpage); |
bool ReadPage(QString fileName, SCFonts &avail, ScribusDoc *doc, ScribusView *view, int PageToLoad, bool Mpage); |
QString WriteElem(QPtrList<PageItem> *Selitems, ScribusDoc *doc); |
bool ReadElemHeader(QString file, bool isFile, double *x, double *y, double *w, double *h); |
bool ReadElem(QString fileName, SCFonts &avail, ScribusDoc *doc, int Xp, int Yp, bool Fi, bool loc, |
45,6 → 49,9 |
}; |
QValueList<Linked> LFrames; |
QStringList MNames; |
QMap<QString,QString> DoFonts; |
QMap<uint,QString> DoVorl; |
uint VorlC; |
signals: |
void NewPage(int); |
/trunk/Scribus/scribus/scribusXml.cpp |
---|
75,6 → 75,456 |
/** end changes */ |
} |
void ScriXmlDoc::GetItemProps(bool newVersion, QDomElement *obj, struct CLBuf *OB) |
{ |
QString tmp; |
int x, y; |
double xf, yf; |
OB->PType = QStoInt(obj->attribute("PTYPE")); |
OB->Width=QStodouble(obj->attribute("WIDTH")); |
OB->Height=QStodouble(obj->attribute("HEIGHT")); |
OB->RadRect = QStodouble(obj->attribute("RADRECT","0")); |
OB->ClipEdited = QStoInt(obj->attribute("CLIPEDIT", "0")); |
OB->FrameType = QStoInt(obj->attribute("FRTYPE", "0")); |
OB->Pwidth=QStodouble(obj->attribute("PWIDTH")); |
OB->Pcolor=obj->attribute("PCOLOR"); |
if ((!newVersion) && (OB->PType == 4)) |
{ |
OB->TxtFill = obj->attribute("PCOLOR2"); |
OB->Pcolor2 = "None"; |
} |
else |
{ |
OB->Pcolor2 = obj->attribute("PCOLOR2"); |
OB->TxtFill = obj->attribute("TXTFILL", "Black"); |
} |
OB->Shade=QStoInt(obj->attribute("SHADE")); |
OB->Shade2=QStoInt(obj->attribute("SHADE2")); |
OB->TxtStroke=obj->attribute("TXTSTROKE", "None"); |
OB->ShTxtFill=QStoInt(obj->attribute("TXTFILLSH", "100")); |
OB->ShTxtStroke=QStoInt(obj->attribute("TXTSTRSH", "100")); |
OB->TxtScale=QStoInt(obj->attribute("TXTSCALE", "100")); |
OB->TxTStyle=QStoInt(obj->attribute("TXTSTYLE", "0")); |
OB->Cols = QStoInt(obj->attribute("COLUMNS","1")); |
OB->ColGap = QStodouble(obj->attribute("COLGAP","0.0")); |
OB->GrType = QStoInt(obj->attribute("GRTYP","0")); |
OB->fill_gradient.clearStops(); |
if (OB->GrType != 0) |
{ |
OB->GrStartX = QStodouble(obj->attribute("GRSTARTX","0.0")); |
OB->GrStartY = QStodouble(obj->attribute("GRSTARTY","0.0")); |
OB->GrEndX = QStodouble(obj->attribute("GRENDX","0.0")); |
OB->GrEndY = QStodouble(obj->attribute("GRENDY","0.0")); |
OB->GrColor = obj->attribute("GRCOLOR",""); |
if (OB->GrColor != "") |
{ |
OB->GrColor2 = obj->attribute("GRCOLOR2",""); |
OB->GrShade = QStoInt(obj->attribute("GRSHADE","100")); |
OB->GrShade2 = QStoInt(obj->attribute("GRSHADE2","100")); |
} |
} |
OB->Rot=QStodouble(obj->attribute("ROT")); |
OB->PLineArt=Qt::PenStyle(QStoInt(obj->attribute("PLINEART"))); |
OB->PLineEnd=Qt::PenCapStyle(QStoInt(obj->attribute("PLINEEND","0"))); |
OB->PLineJoin=Qt::PenJoinStyle(QStoInt(obj->attribute("PLINEJOIN","0"))); |
OB->LineSp=QStodouble(obj->attribute("LINESP")); |
OB->ExtraV=QStodouble(obj->attribute("EXTRAV","0")); |
OB->LocalScX=QStodouble(obj->attribute("LOCALSCX")); |
OB->LocalScY=QStodouble(obj->attribute("LOCALSCY")); |
OB->LocalX=QStodouble(obj->attribute("LOCALX")); |
OB->LocalY=QStodouble(obj->attribute("LOCALY")); |
OB->PicArt=QStoInt(obj->attribute("PICART")); |
OB->flippedH=QStoInt(obj->attribute("FLIPPEDH")); |
OB->flippedV=QStoInt(obj->attribute("FLIPPEDV")); |
OB->BBoxX=QStodouble(obj->attribute("BBOXX")); |
OB->BBoxH=QStodouble(obj->attribute("BBOXH")); |
OB->ScaleType = QStoInt(obj->attribute("SCALETYPE","1")); |
OB->AspectRatio = QStoInt(obj->attribute("RATIO","0")); |
OB->isPrintable=QStoInt(obj->attribute("PRINTABLE")); |
OB->isAnnotation=QStoInt(obj->attribute("ANNOTATION","0")); |
OB->AnType = QStoInt(obj->attribute("ANTYPE","0")); |
OB->AnAction = obj->attribute("ANACTION",""); |
OB->An_E_act = obj->attribute("ANEACT",""); |
OB->An_X_act = obj->attribute("ANXACT",""); |
OB->An_D_act = obj->attribute("ANDACT",""); |
OB->An_Fo_act = obj->attribute("ANFOACT",""); |
OB->An_Bl_act = obj->attribute("ANBLACT",""); |
OB->An_K_act = obj->attribute("ANKACT",""); |
OB->An_F_act = obj->attribute("ANFACT",""); |
OB->An_V_act = obj->attribute("ANVACT",""); |
OB->An_C_act = obj->attribute("ANCACT",""); |
OB->AnActType = QStoInt(obj->attribute("ANACTYP","0")); |
OB->An_Extern = obj->attribute("ANEXTERN",""); |
if ((OB->An_Extern != "") && (OB->AnActType != 8)) |
{ |
QFileInfo efp(OB->An_Extern); |
OB->An_Extern = efp.absFilePath(); |
} |
OB->AnZiel = QStoInt(obj->attribute("ANZIEL","0")); |
OB->AnName = obj->attribute("ANNAME",""); |
OB->AnToolTip = obj->attribute("ANTOOLTIP",""); |
OB->AnRollOver = obj->attribute("ANROLL",""); |
OB->AnDown = obj->attribute("ANDOWN",""); |
OB->AnBwid = QStoInt(obj->attribute("ANBWID","1")); |
OB->AnBsty = QStoInt(obj->attribute("ANBSTY","0")); |
OB->AnFeed = QStoInt(obj->attribute("ANFEED","1")); |
OB->AnFlag = QStoInt(obj->attribute("ANFLAG","0")); |
OB->AnFont = QStoInt(obj->attribute("ANFONT","4")); |
OB->AnFormat = QStoInt(obj->attribute("ANFORMAT","0")); |
OB->AnVis = QStoInt(obj->attribute("ANVIS","0")); |
OB->AnIsChk = static_cast<bool>(QStoInt(obj->attribute("ANCHK","0"))); |
OB->AnAAact = static_cast<bool>(QStoInt(obj->attribute("ANAA","0"))); |
OB->AnHTML = static_cast<bool>(QStoInt(obj->attribute("ANHTML","0"))); |
OB->AnUseIcons = static_cast<bool>(QStoInt(obj->attribute("ANICON","0"))); |
OB->AnChkStil = QStoInt(obj->attribute("ANCHKS","0")); |
OB->AnMaxChar = QStoInt(obj->attribute("ANMC","-1")); |
OB->AnBColor = obj->attribute("ANBCOL","None"); |
OB->AnIPlace = QStoInt(obj->attribute("ANPLACE","1")); |
OB->AnScaleW = QStoInt(obj->attribute("ANSCALE","0")); |
if (QStoInt(obj->attribute("TRANSPARENT","0")) == 1) |
OB->Pcolor = "None"; |
OB->Textflow=QStoInt(obj->attribute("TEXTFLOW")); |
OB->Textflow2=QStoInt(obj->attribute("TEXTFLOW2","0")); |
OB->Extra=QStodouble(obj->attribute("EXTRA")); |
OB->TExtra=QStodouble(obj->attribute("TEXTRA", "1")); |
OB->BExtra=QStodouble(obj->attribute("BEXTRA", "1")); |
OB->RExtra=QStodouble(obj->attribute("REXTRA", "1")); |
OB->PoShow = QStoInt(obj->attribute("PTLSHOW","0")); |
OB->BaseOffs = QStodouble(obj->attribute("BASEOF","0")); |
OB->ISize = qRound(QStodouble(obj->attribute("ISIZE","12")) * 10); |
OB->Pfile=obj->attribute("PFILE"); |
OB->Pfile2=obj->attribute("PFILE2",""); |
OB->Pfile3=obj->attribute("PFILE3",""); |
OB->IProfile=obj->attribute("PRFILE",""); |
OB->EmProfile=obj->attribute("EPROF",""); |
OB->IRender = QStoInt(obj->attribute("IRENDER","1")); |
OB->UseEmbedded = QStoInt(obj->attribute("EMBEDDED","1")); |
OB->Locked = static_cast<bool>(QStoInt(obj->attribute("LOCK","0"))); |
OB->LockRes = static_cast<bool>(QStoInt(obj->attribute("LOCKR","0"))); |
OB->Reverse = static_cast<bool>(QStoInt(obj->attribute("REVERS","0"))); |
OB->InvPict = static_cast<bool>(QStoInt(obj->attribute("INVERS","0"))); |
OB->isTableItem = static_cast<bool>(QStoInt(obj->attribute("isTableItem","0"))); |
OB->TopLine = static_cast<bool>(QStoInt(obj->attribute("TopLine","0"))); |
OB->LeftLine = static_cast<bool>(QStoInt(obj->attribute("LeftLine","0"))); |
OB->RightLine = static_cast<bool>(QStoInt(obj->attribute("RightLine","0"))); |
OB->BottomLine = static_cast<bool>(QStoInt(obj->attribute("BottomLine","0"))); |
OB->TopLinkID = QStoInt(obj->attribute("TopLINK","-1")); |
OB->LeftLinkID = QStoInt(obj->attribute("LeftLINK","-1")); |
OB->RightLinkID = QStoInt(obj->attribute("RightLINK","-1")); |
OB->BottomLinkID = QStoInt(obj->attribute("BottomLINK","-1")); |
OB->Transparency = QStodouble(obj->attribute("TransValue","0.0")); |
if (obj->hasAttribute("TransValueS")) |
OB->TranspStroke = QStodouble(obj->attribute("TransValueS","0.0")); |
else |
OB->TranspStroke = OB->Transparency; |
tmp = ""; |
if (obj->hasAttribute("NUMCLIP")) |
{ |
OB->Clip.resize(obj->attribute("NUMCLIP").toUInt()); |
tmp = obj->attribute("CLIPCOOR"); |
QTextStream fc(&tmp, IO_ReadOnly); |
for (uint c=0; c<obj->attribute("NUMCLIP").toUInt(); ++c) |
{ |
fc >> x; |
fc >> y; |
OB->Clip.setPoint(c, x, y); |
} |
} |
else |
OB->Clip.resize(0); |
tmp = ""; |
if (obj->hasAttribute("NUMPO")) |
{ |
OB->PoLine.resize(obj->attribute("NUMPO").toUInt()); |
tmp = obj->attribute("POCOOR"); |
QTextStream fp(&tmp, IO_ReadOnly); |
for (uint cx=0; cx<obj->attribute("NUMPO").toUInt(); ++cx) |
{ |
fp >> xf; |
fp >> yf; |
OB->PoLine.setPoint(cx, xf, yf); |
} |
} |
else |
OB->PoLine.resize(0); |
tmp = ""; |
if ((obj->hasAttribute("NUMTAB")) && (QStoInt(obj->attribute("NUMTAB","0")) != 0)) |
{ |
tmp = obj->attribute("TABS"); |
QTextStream tgv(&tmp, IO_ReadOnly); |
OB->TabValues.clear(); |
for (int cxv = 0; cxv < QStoInt(obj->attribute("NUMTAB","0")); ++cxv) |
{ |
tgv >> xf; |
OB->TabValues.append(xf); |
} |
tmp = ""; |
} |
else |
OB->TabValues.clear(); |
if ((obj->hasAttribute("NUMDASH")) && (QStoInt(obj->attribute("NUMDASH","0")) != 0)) |
{ |
tmp = obj->attribute("DASHS"); |
QTextStream dgv(&tmp, IO_ReadOnly); |
OB->DashValues.clear(); |
for (int cxv = 0; cxv < QStoInt(obj->attribute("NUMDASH","0")); ++cxv) |
{ |
dgv >> xf; |
OB->DashValues.append(xf); |
} |
tmp = ""; |
} |
else |
OB->DashValues.clear(); |
OB->DashOffset = QStodouble(obj->attribute("DASHOFF","0.0")); |
} |
void ScriXmlDoc::SetItemProps(QDomElement *ob, PageItem* item) |
{ |
double xf, yf; |
QString tmp, tmpy; |
ob->setAttribute("PTYPE",item->PType); |
ob->setAttribute("XPOS",item->Xpos); |
ob->setAttribute("YPOS",item->Ypos); |
ob->setAttribute("WIDTH",item->Width); |
ob->setAttribute("HEIGHT",item->Height); |
ob->setAttribute("RADRECT",item->RadRect); |
ob->setAttribute("FRTYPE", item->FrameType); |
ob->setAttribute("CLIPEDIT", item->ClipEdited ? 1 : 0); |
ob->setAttribute("PWIDTH",item->Pwidth); |
ob->setAttribute("PCOLOR",item->Pcolor); |
ob->setAttribute("PCOLOR2",item->Pcolor2); |
ob->setAttribute("TXTFILL",item->TxtFill); |
ob->setAttribute("TXTSTROKE",item->TxtStroke); |
ob->setAttribute("TXTSTRSH",item->ShTxtStroke); |
ob->setAttribute("TXTFILLSH",item->ShTxtFill); |
ob->setAttribute("TXTSCALE",item->TxtScale); |
ob->setAttribute("TXTSTYLE",item->TxTStyle); |
ob->setAttribute("COLUMNS", item->Cols); |
ob->setAttribute("COLGAP", item->ColGap); |
ob->setAttribute("NAMEDLST",item->NamedLStyle); |
ob->setAttribute("SHADE",item->Shade); |
ob->setAttribute("SHADE2",item->Shade2); |
ob->setAttribute("GRTYP",item->GrType); |
ob->setAttribute("ROT",item->Rot); |
ob->setAttribute("PLINEART",item->PLineArt); |
ob->setAttribute("PLINEEND", item->PLineEnd); |
ob->setAttribute("PLINEJOIN", item->PLineJoin); |
ob->setAttribute("LINESP",item->LineSp); |
ob->setAttribute("EXTRAV",item->ExtraV); |
ob->setAttribute("LOCALSCX",item->LocalScX); |
ob->setAttribute("LOCALSCY",item->LocalScY); |
ob->setAttribute("LOCALX",item->LocalX); |
ob->setAttribute("LOCALY",item->LocalY); |
ob->setAttribute("PICART", item->PicArt ? 1 : 0); |
ob->setAttribute("PLTSHOW", item->PoShow ? 1 : 0); |
ob->setAttribute("BASEOF", item->BaseOffs); |
ob->setAttribute("FLIPPEDH",item->flippedH); |
ob->setAttribute("FLIPPEDV",item->flippedV); |
ob->setAttribute("BBOXX",item->BBoxX); |
ob->setAttribute("BBOXH",item->BBoxH); |
ob->setAttribute("IFONT",item->IFont); |
ob->setAttribute("ISIZE",item->ISize / 10.0 ); |
ob->setAttribute("SCALETYPE", item->ScaleType ? 1 : 0); |
ob->setAttribute("RATIO", item->AspectRatio ? 1 : 0); |
ob->setAttribute("PRINTABLE", item->isPrintable ? 1 : 0); |
if(item->isAnnotation) |
{ |
ob->setAttribute("ANNOTATION",1); |
ob->setAttribute("ANTYPE", item->AnType); |
ob->setAttribute("ANACTION", item->AnAction); |
ob->setAttribute("ANEACT", item->An_E_act); |
ob->setAttribute("ANXACT", item->An_X_act); |
ob->setAttribute("ANDACT", item->An_D_act); |
ob->setAttribute("ANFOACT", item->An_Fo_act); |
ob->setAttribute("ANBLACT", item->An_Bl_act); |
ob->setAttribute("ANKACT", item->An_K_act); |
ob->setAttribute("ANFACT", item->An_F_act); |
ob->setAttribute("ANVACT", item->An_V_act); |
ob->setAttribute("ANCACT", item->An_C_act); |
if (item->AnActType == 8) |
ob->setAttribute("ANEXTERN", item->An_Extern); |
else |
ob->setAttribute("ANEXTERN", Path2Relative(item->An_Extern)); |
ob->setAttribute("ANZIEL", item->AnZiel); |
ob->setAttribute("ANACTYP", item->AnActType); |
ob->setAttribute("ANTOOLTIP", item->AnToolTip); |
ob->setAttribute("ANBWID", item->AnBwid); |
ob->setAttribute("ANBSTY", item->AnBsty); |
ob->setAttribute("ANFEED", item->AnFeed); |
ob->setAttribute("ANFLAG", item->AnFlag); |
ob->setAttribute("ANFONT", item->AnFont); |
ob->setAttribute("ANFORMAT", item->AnFormat); |
ob->setAttribute("ANROLL", item->AnRollOver); |
ob->setAttribute("ANDOWN", item->AnDown); |
ob->setAttribute("ANVIS", item->AnVis); |
ob->setAttribute("ANMC", item->AnMaxChar); |
ob->setAttribute("ANCHK", item->AnIsChk); |
ob->setAttribute("ANAA", item->AnAAact); |
ob->setAttribute("ANCHKS", item->AnChkStil); |
ob->setAttribute("ANBCOL", item->AnBColor); |
ob->setAttribute("ANHTML", item->AnHTML); |
ob->setAttribute("ANICON", item->AnUseIcons); |
ob->setAttribute("ANPLACE", item->AnIPlace); |
ob->setAttribute("ANSCALE", item->AnScaleW); |
} |
else |
ob->setAttribute("ANNOTATION",0); |
ob->setAttribute("ANNAME", !item->AutoName ? item->AnName : QString("")); |
ob->setAttribute("TEXTFLOW", item->Textflow ? 1 : 0); |
ob->setAttribute("TEXTFLOW2", item->Textflow2 ? 1 : 0); |
ob->setAttribute("AUTOTEXT", item->isAutoText ? 1 : 0); |
ob->setAttribute("EXTRA",item->Extra); |
ob->setAttribute("TEXTRA",item->TExtra); |
ob->setAttribute("BEXTRA",item->BExtra); |
ob->setAttribute("REXTRA",item->RExtra); |
if (((item->PType == 2) || (item->PType == 4)) && (item->Pfile != "")) |
ob->setAttribute("PFILE",Path2Relative(item->Pfile)); |
else |
ob->setAttribute("PFILE",""); |
if (item->Pfile2 != "") |
ob->setAttribute("PFILE2",Path2Relative(item->Pfile2)); |
else |
ob->setAttribute("PFILE2",""); |
if (item->Pfile3 != "") |
ob->setAttribute("PFILE3",Path2Relative(item->Pfile3)); |
else |
ob->setAttribute("PFILE3",""); |
ob->setAttribute("PRFILE",item->IProfile); |
ob->setAttribute("EPROF", item->EmProfile); |
ob->setAttribute("IRENDER",item->IRender); |
ob->setAttribute("EMBEDDED", item->UseEmbedded ? 1 : 0); |
ob->setAttribute("LOCK", item->Locked ? 1 : 0); |
ob->setAttribute("LOCKR", item->LockRes ? 1 : 0); |
ob->setAttribute("REVERS", item->Reverse ? 1 : 0); |
ob->setAttribute("INVERS", item->InvPict ? 1 : 0); |
ob->setAttribute("TransValue", item->Transparency); |
ob->setAttribute("TransValueS", item->TranspStroke); |
ob->setAttribute("isTableItem", static_cast<int>(item->isTableItem)); |
ob->setAttribute("TopLine", static_cast<int>(item->TopLine)); |
ob->setAttribute("LeftLine", static_cast<int>(item->LeftLine)); |
ob->setAttribute("RightLine", static_cast<int>(item->RightLine)); |
ob->setAttribute("BottomLine", static_cast<int>(item->BottomLine)); |
if (item->isTableItem) |
{ |
if (item->TopLink != 0) |
ob->setAttribute("TopLINK", item->TopLink->ItemNr); |
else |
ob->setAttribute("TopLINK", -1); |
if (item->LeftLink != 0) |
ob->setAttribute("LeftLINK", item->LeftLink->ItemNr); |
else |
ob->setAttribute("LeftLINK", -1); |
if (item->RightLink != 0) |
ob->setAttribute("RightLINK", item->RightLink->ItemNr); |
else |
ob->setAttribute("RightLINK", -1); |
if (item->BottomLink != 0) |
ob->setAttribute("BottomLINK", item->BottomLink->ItemNr); |
else |
ob->setAttribute("BottomLINK", -1); |
ob->setAttribute("OwnLINK", item->ItemNr); |
} |
ob->setAttribute("NUMDASH", static_cast<int>(item->DashValues.count())); |
QString dlp = ""; |
QValueList<double>::Iterator dax; |
for (dax = item->DashValues.begin(); dax != item->DashValues.end(); ++dax) |
dlp += tmp.setNum((*dax)) + " "; |
ob->setAttribute("DASHS", dlp); |
ob->setAttribute("DASHOFF", item->DashOffset); |
ob->setAttribute("NUMPO",item->PoLine.size()); |
QString polp = ""; |
for (uint nxx=0; nxx<item->PoLine.size(); ++nxx) |
{ |
item->PoLine.point(nxx, &xf, &yf); |
polp += tmp.setNum(xf) + " " + tmpy.setNum(yf) + " "; |
} |
ob->setAttribute("POCOOR", polp); |
ob->setAttribute("NUMTAB", static_cast<int>(item->TabValues.count())); |
QString tlp = ""; |
QValueList<double>::Iterator tax; |
for (tax = item->TabValues.begin(); tax != item->TabValues.end(); ++tax) |
tlp += tmp.setNum((*tax)) + " "; |
ob->setAttribute("TABS", tlp); |
ob->setAttribute("NUMGROUP", static_cast<int>(item->Groups.count())); |
QString glp = ""; |
QValueStack<int>::Iterator nx; |
for (nx = item->Groups.begin(); nx != item->Groups.end(); ++nx) |
glp += tmp.setNum((*nx)) + " "; |
ob->setAttribute("GROUPS", glp); |
ob->setAttribute("LANGUAGE", item->Language); |
} |
QString ScriXmlDoc::GetItemText(QDomElement *it, ScribusDoc *doc, preV *Prefs, bool VorLFound, bool impo) |
{ |
QString tmp2, tmf, tmpf, tmp3, tmp; |
tmp = ""; |
tmp2 = it->attribute("CH"); |
tmp2.replace(QRegExp("\r"), QChar(5)); |
tmp2.replace(QRegExp("\n"), QChar(5)); |
tmp2.replace(QRegExp("\t"), QChar(4)); |
tmpf = it->attribute("CFONT", doc->Dfont); |
if (tmpf == "") |
tmpf = doc->Dfont; |
tmf = tmpf; |
if (!DoFonts.contains(tmpf)) |
tmpf = AskForFont(Prefs->AvailFonts, tmpf, Prefs, doc); |
else |
tmpf = DoFonts[tmf]; |
tmp3 = "\t" + tmpf + "\t"; |
tmp3 += it->attribute("CSIZE") + "\t"; |
tmp3 += it->attribute("CCOLOR") + "\t"; |
tmp3 += it->attribute("CEXTRA") + "\t"; |
tmp3 += it->attribute("CSHADE") + "\t"; |
tmp3 += it->attribute("CSTYLE") + "\t"; |
if (impo) |
{ |
if (VorLFound) |
tmp3 += DoVorl[it->attribute("CAB","0").toUInt()] + "\t"; |
else |
{ |
if (it->attribute("CAB","0").toUInt() < 5) |
tmp3 += it->attribute("CAB","0")+"\t"; |
else |
tmp3 += "0\t"; |
} |
} |
else |
tmp3 += it->attribute("CAB","0") + "\t"; |
tmp3 += it->attribute("CSTROKE","None") + "\t"; |
tmp3 += it->attribute("CSHADE2","100") + "\t"; |
tmp3 += it->attribute("CSCALE","100") + "\n"; |
for (uint cxx=0; cxx<tmp2.length(); ++cxx) |
tmp += tmp2.at(cxx)+tmp3; |
return tmp; |
} |
QString ScriXmlDoc::AskForFont(SCFonts &avail, QString fStr, preV *Prefs, ScribusDoc *doc) |
{ |
QFont fo; |
QString tmpf = fStr; |
if ((!avail.find(tmpf)) || (!avail[tmpf]->UseFont)) |
{ |
if ((!Prefs->GFontSub.contains(tmpf)) || (!avail[Prefs->GFontSub[tmpf]]->UseFont)) |
{ |
qApp->setOverrideCursor(QCursor(arrowCursor), true); |
DmF *dia = new DmF(0, tmpf, Prefs); |
dia->exec(); |
tmpf = dia->Ersatz; |
delete dia; |
qApp->setOverrideCursor(QCursor(waitCursor), true); |
Prefs->GFontSub[fStr] = tmpf; |
} |
else |
tmpf = Prefs->GFontSub[tmpf]; |
} |
fo = avail[tmpf]->Font; |
fo.setPointSize(qRound(doc->Dsize / 10.0)); |
doc->AddFont(tmpf, fo); |
DoFonts[fStr] = tmpf; |
return tmpf; |
} |
bool ScriXmlDoc::ReadLStyles(QString fileName, QMap<QString,multiLine> *Sty) |
{ |
QDomDocument docu("scridoc"); |
129,16 → 579,132 |
return true; |
} |
void ScriXmlDoc::GetStyle(QDomElement *pg, struct StVorL *vg, QValueList<StVorL> &Vorlagen, ScribusDoc* doc, preV *Prefs, bool fl) |
{ |
bool fou; |
QString tmpf, tmf, tmV; |
double xf; |
fou = false; |
vg->Vname = pg->attribute("NAME"); |
vg->LineSpa = QStodouble(pg->attribute("LINESP")); |
vg->Indent = QStodouble(pg->attribute("INDENT","0")); |
vg->First = QStodouble(pg->attribute("FIRST","0")); |
vg->Ausri = QStoInt(pg->attribute("ALIGN")); |
vg->Avor = QStodouble(pg->attribute("VOR","0")); |
vg->Anach = QStodouble(pg->attribute("NACH","0")); |
tmpf = pg->attribute("FONT", doc->Dfont); |
if (tmpf == "") |
tmpf = doc->Dfont; |
tmf = tmpf; |
if (!DoFonts.contains(tmpf)) |
tmpf = AskForFont(Prefs->AvailFonts, tmpf, Prefs, doc); |
else |
tmpf = DoFonts[tmf]; |
vg->Font = tmpf; |
vg->FontSize = qRound(QStodouble(pg->attribute("FONTSIZE","12")) * 10.0); |
vg->Drop = static_cast<bool>(QStoInt(pg->attribute("DROP","0"))); |
vg->DropLin = QStoInt(pg->attribute("DROPLIN","2")); |
vg->FontEffect = QStoInt(pg->attribute("EFFECT","0")); |
vg->FColor = pg->attribute("FCOLOR", doc->Dbrush); |
vg->FShade = QStoInt(pg->attribute("FSHADE", "100")); |
vg->SColor = pg->attribute("SCOLOR", doc->Dpen); |
vg->SShade = QStoInt(pg->attribute("SSHADE", "100")); |
vg->BaseAdj = static_cast<bool>(QStoInt(pg->attribute("BASE","0"))); |
if ((pg->hasAttribute("NUMTAB")) && (QStoInt(pg->attribute("NUMTAB","0")) != 0)) |
{ |
QString tmp = pg->attribute("TABS"); |
QTextStream tgv(&tmp, IO_ReadOnly); |
vg->TabValues.clear(); |
for (int cxv = 0; cxv < QStoInt(pg->attribute("NUMTAB","0")); ++cxv) |
{ |
tgv >> xf; |
vg->TabValues.append(xf); |
} |
tmp = ""; |
} |
else |
vg->TabValues.clear(); |
for (uint xx=0; xx<Vorlagen.count(); ++xx) |
{ |
if (vg->Vname == Vorlagen[xx].Vname) |
{ |
if ((vg->LineSpa == Vorlagen[xx].LineSpa) && |
(vg->Indent == Vorlagen[xx].Indent) && |
(vg->First == Vorlagen[xx].First) && |
(vg->Ausri == Vorlagen[xx].Ausri) && |
(vg->Avor == Vorlagen[xx].Avor) && |
(vg->Anach == Vorlagen[xx].Anach) && |
(vg->Font == Vorlagen[xx].Font) && |
(vg->TabValues == Vorlagen[xx].TabValues) && |
(vg->Drop == Vorlagen[xx].Drop) && |
(vg->DropLin == Vorlagen[xx].DropLin) && |
(vg->FontEffect == Vorlagen[xx].FontEffect) && |
(vg->FColor == Vorlagen[xx].FColor) && |
(vg->FShade == Vorlagen[xx].FShade) && |
(vg->SColor == Vorlagen[xx].SColor) && |
(vg->SShade == Vorlagen[xx].SShade) && |
(vg->BaseAdj == Vorlagen[xx].BaseAdj) && |
(vg->FontSize == Vorlagen[xx].FontSize)) |
fou = true; |
else |
{ |
vg->Vname = "Copy of "+Vorlagen[xx].Vname; |
fou = false; |
} |
break; |
} |
} |
if (!fou) |
{ |
for (uint xx=0; xx< Vorlagen.count(); ++xx) |
{ |
if ((vg->LineSpa == Vorlagen[xx].LineSpa) && |
(vg->Indent == Vorlagen[xx].Indent) && |
(vg->First == Vorlagen[xx].First) && |
(vg->Ausri == Vorlagen[xx].Ausri) && |
(vg->Avor == Vorlagen[xx].Avor) && |
(vg->Anach == Vorlagen[xx].Anach) && |
(vg->Font == Vorlagen[xx].Font) && |
(vg->TabValues == Vorlagen[xx].TabValues) && |
(vg->Drop == Vorlagen[xx].Drop) && |
(vg->DropLin == Vorlagen[xx].DropLin) && |
(vg->FontEffect == Vorlagen[xx].FontEffect) && |
(vg->FColor == Vorlagen[xx].FColor) && |
(vg->FShade == Vorlagen[xx].FShade) && |
(vg->SColor == Vorlagen[xx].SColor) && |
(vg->SShade == Vorlagen[xx].SShade) && |
(vg->BaseAdj == Vorlagen[xx].BaseAdj) && |
(vg->FontSize == Vorlagen[xx].FontSize)) |
{ |
vg->Vname = Vorlagen[xx].Vname; |
fou = true; |
if (fl) |
{ |
DoVorl[VorlC] = tmV.setNum(xx); |
VorlC++; |
} |
break; |
} |
} |
} |
if (!fou) |
{ |
Vorlagen.append(*vg); |
if (fl) |
{ |
DoVorl[VorlC] = tmV.setNum(Vorlagen.count()-1); |
VorlC++; |
} |
} |
} |
bool ScriXmlDoc::ReadStyles(QString fileName, ScribusDoc* doc, preV *Prefs) |
{ |
struct StVorL vg; |
QMap<QString,QString> DoFonts; |
QDomDocument docu("scridoc"); |
QString f = ""; |
QString tmpf; |
QFont fo; |
bool fou; |
double xf; |
QString tmpf, tmf; |
DoFonts.clear(); |
f = ReadDatei(fileName); |
if (f == "") |
156,126 → 722,8 |
while(!PAGE.isNull()) |
{ |
QDomElement pg=PAGE.toElement(); |
if(pg.tagName()=="FONT") |
{ |
tmpf = pg.attribute("NAME"); |
if ((!Prefs->AvailFonts.find(tmpf)) || (!Prefs->AvailFonts[tmpf]->UseFont)) |
{ |
if ((!Prefs->GFontSub.contains(tmpf)) || (!Prefs->AvailFonts[Prefs->GFontSub[tmpf]]->UseFont)) |
{ |
qApp->setOverrideCursor(QCursor(arrowCursor), true); |
DmF *dia = new DmF(0, tmpf, Prefs); |
dia->exec(); |
tmpf = dia->Ersatz; |
delete dia; |
qApp->setOverrideCursor(QCursor(waitCursor), true); |
Prefs->GFontSub[pg.attribute("NAME")] = tmpf; |
} |
else |
tmpf = Prefs->GFontSub[tmpf]; |
} |
fo = Prefs->AvailFonts[tmpf]->Font; |
fo.setPointSize(qRound(doc->Dsize / 10.0)); |
doc->AddFont(tmpf, fo); |
DoFonts[pg.attribute("NAME")] = tmpf; |
} |
if(pg.tagName()=="STYLE") |
{ |
fou = false; |
vg.Vname = pg.attribute("NAME"); |
vg.LineSpa = QStodouble(pg.attribute("LINESP")); |
vg.Indent = QStodouble(pg.attribute("INDENT","0")); |
vg.First = QStodouble(pg.attribute("FIRST","0")); |
vg.Ausri = QStoInt(pg.attribute("ALIGN")); |
vg.Avor = QStodouble(pg.attribute("VOR","0")); |
vg.Anach = QStodouble(pg.attribute("NACH","0")); |
if (pg.hasAttribute("FONT")) |
vg.Font = DoFonts[pg.attribute("FONT")]; |
else |
vg.Font = DoFonts[doc->Dfont]; |
vg.FontSize = qRound(QStodouble(pg.attribute("FONTSIZE","12")) * 10.0); |
vg.Drop = static_cast<bool>(QStoInt(pg.attribute("DROP","0"))); |
vg.DropLin = QStoInt(pg.attribute("DROPLIN","2")); |
vg.FontEffect = QStoInt(pg.attribute("EFFECT","0")); |
vg.FColor = pg.attribute("FCOLOR", doc->Dbrush); |
vg.FShade = QStoInt(pg.attribute("FSHADE", "100")); |
vg.SColor = pg.attribute("SCOLOR", doc->Dpen); |
vg.SShade = QStoInt(pg.attribute("SSHADE", "100")); |
vg.BaseAdj = static_cast<bool>(QStoInt(pg.attribute("BASE","0"))); |
if ((pg.hasAttribute("NUMTAB")) && (QStoInt(pg.attribute("NUMTAB","0")) != 0)) |
{ |
QString tmp = pg.attribute("TABS"); |
QTextStream tgv(&tmp, IO_ReadOnly); |
vg.TabValues.clear(); |
for (int cxv = 0; cxv < QStoInt(pg.attribute("NUMTAB","0")); ++cxv) |
{ |
tgv >> xf; |
vg.TabValues.append(xf); |
} |
tmp = ""; |
} |
else |
vg.TabValues.clear(); |
for (uint xx=0; xx<Vorlagen.count(); ++xx) |
{ |
if (vg.Vname == Vorlagen[xx].Vname) |
{ |
if ((vg.LineSpa == Vorlagen[xx].LineSpa) && |
(vg.Indent == Vorlagen[xx].Indent) && |
(vg.First == Vorlagen[xx].First) && |
(vg.Ausri == Vorlagen[xx].Ausri) && |
(vg.Avor == Vorlagen[xx].Avor) && |
(vg.Anach == Vorlagen[xx].Anach) && |
(vg.Font == Vorlagen[xx].Font) && |
(vg.TabValues == Vorlagen[xx].TabValues) && |
(vg.Drop == Vorlagen[xx].Drop) && |
(vg.DropLin == Vorlagen[xx].DropLin) && |
(vg.FontEffect == Vorlagen[xx].FontEffect) && |
(vg.FColor == Vorlagen[xx].FColor) && |
(vg.FShade == Vorlagen[xx].FShade) && |
(vg.SColor == Vorlagen[xx].SColor) && |
(vg.SShade == Vorlagen[xx].SShade) && |
(vg.BaseAdj == Vorlagen[xx].BaseAdj) && |
(vg.FontSize == Vorlagen[xx].FontSize)) |
fou = true; |
else |
{ |
vg.Vname = "Copy of "+Vorlagen[xx].Vname; |
fou = false; |
} |
break; |
} |
} |
if (!fou) |
{ |
for (uint xx=0; xx<Vorlagen.count(); ++xx) |
{ |
if ((vg.LineSpa == Vorlagen[xx].LineSpa) && |
(vg.Indent == Vorlagen[xx].Indent) && |
(vg.First == Vorlagen[xx].First) && |
(vg.Ausri == Vorlagen[xx].Ausri) && |
(vg.Avor == Vorlagen[xx].Avor) && |
(vg.Anach == Vorlagen[xx].Anach) && |
(vg.Font == Vorlagen[xx].Font) && |
(vg.TabValues == Vorlagen[xx].TabValues) && |
(vg.Drop == Vorlagen[xx].Drop) && |
(vg.DropLin == Vorlagen[xx].DropLin) && |
(vg.FontEffect == Vorlagen[xx].FontEffect) && |
(vg.FColor == Vorlagen[xx].FColor) && |
(vg.FShade == Vorlagen[xx].FShade) && |
(vg.SColor == Vorlagen[xx].SColor) && |
(vg.SShade == Vorlagen[xx].SShade) && |
(vg.BaseAdj == Vorlagen[xx].BaseAdj) && |
(vg.FontSize == Vorlagen[xx].FontSize)) |
{ |
fou = true; |
break; |
} |
} |
} |
if (!fou) |
Vorlagen.append(vg); |
} |
GetStyle(&pg, &vg, Vorlagen, doc, Prefs, false); |
PAGE=PAGE.nextSibling(); |
} |
DOC=DOC.nextSibling(); |
374,15 → 822,11 |
LFrames.clear(); |
QString tmV, tmp, tmpf, tmp2, tmp3, tmp4, PgNam, f, Defont, tmf; |
QFont fo; |
QMap<QString,QString> DoFonts; |
QMap<uint,QString> DoVorl; |
QMap<int,int> TableID; |
QPtrList<PageItem> TableItems; |
uint VorlC; |
int x, y, a, counter, baseobj; |
double xf, yf; |
int x, a, counter, baseobj; |
double xf; |
bool newVersion = false; |
bool fou; |
bool VorLFound = false; |
DoVorl.clear(); |
DoFonts.clear(); |
427,137 → 871,8 |
} |
if(pg.tagName()=="STYLE") |
{ |
fou = false; |
GetStyle(&pg, &vg, doc->Vorlagen, doc, view->Prefs, true); |
VorLFound = true; |
vg.Vname = pg.attribute("NAME"); |
vg.LineSpa = QStodouble(pg.attribute("LINESP")); |
vg.Indent = QStodouble(pg.attribute("INDENT","0")); |
vg.First = QStodouble(pg.attribute("FIRST","0")); |
vg.Ausri = QStoInt(pg.attribute("ALIGN")); |
vg.Avor = QStodouble(pg.attribute("VOR","0")); |
vg.Anach = QStodouble(pg.attribute("NACH","0")); |
tmpf = pg.attribute("FONT", doc->Dfont); |
if (tmpf == "") |
tmpf = doc->Dfont; |
tmf = tmpf; |
if (!DoFonts.contains(tmpf)) |
{ |
if ((!avail.find(tmpf)) || (!avail[tmpf]->UseFont)) |
{ |
if ((!view->Prefs->GFontSub.contains(tmpf)) || (!avail[view->Prefs->GFontSub[tmpf]]->UseFont)) |
{ |
qApp->setOverrideCursor(QCursor(arrowCursor), true); |
DmF *dia = new DmF(view, tmpf, view->Prefs); |
dia->exec(); |
tmpf = dia->Ersatz; |
delete dia; |
qApp->setOverrideCursor(QCursor(waitCursor), true); |
view->Prefs->GFontSub[tmf] = tmpf; |
} |
else |
tmpf = view->Prefs->GFontSub[tmpf]; |
} |
fo = avail[tmpf]->Font; |
fo.setPointSize(qRound(doc->Dsize / 10.0)); |
doc->AddFont(tmpf, fo); |
DoFonts[tmf] = tmpf; |
} |
else |
tmpf = DoFonts[tmf]; |
vg.Font = tmpf; |
vg.FontSize = qRound(QStodouble(pg.attribute("FONTSIZE","12")) * 10.0); |
vg.Drop = static_cast<bool>(QStoInt(pg.attribute("DROP","0"))); |
vg.DropLin = QStoInt(pg.attribute("DROPLIN","2")); |
vg.FontEffect = QStoInt(pg.attribute("EFFECT","0")); |
vg.FColor = pg.attribute("FCOLOR", doc->Dbrush); |
vg.FShade = QStoInt(pg.attribute("FSHADE", "100")); |
vg.SColor = pg.attribute("SCOLOR", doc->Dpen); |
vg.SShade = QStoInt(pg.attribute("SSHADE", "100")); |
vg.BaseAdj = static_cast<bool>(QStoInt(pg.attribute("BASE","0"))); |
if ((pg.hasAttribute("NUMTAB")) && (QStoInt(pg.attribute("NUMTAB","0")) != 0)) |
{ |
tmp = pg.attribute("TABS"); |
QTextStream tgv(&tmp, IO_ReadOnly); |
vg.TabValues.clear(); |
for (int cxv = 0; cxv < QStoInt(pg.attribute("NUMTAB","0")); ++cxv) |
{ |
tgv >> xf; |
vg.TabValues.append(xf); |
} |
tmp = ""; |
} |
else |
vg.TabValues.clear(); |
for (uint xx=0; xx<doc->Vorlagen.count(); ++xx) |
{ |
if (vg.Vname == doc->Vorlagen[xx].Vname) |
{ |
if ((vg.LineSpa == doc->Vorlagen[xx].LineSpa) && |
(vg.Indent == doc->Vorlagen[xx].Indent) && |
(vg.First == doc->Vorlagen[xx].First) && |
(vg.Ausri == doc->Vorlagen[xx].Ausri) && |
(vg.Avor == doc->Vorlagen[xx].Avor) && |
(vg.Anach == doc->Vorlagen[xx].Anach) && |
(vg.Font == doc->Vorlagen[xx].Font) && |
(vg.TabValues == doc->Vorlagen[xx].TabValues) && |
(vg.Drop == doc->Vorlagen[xx].Drop) && |
(vg.DropLin == doc->Vorlagen[xx].DropLin) && |
(vg.FontEffect == doc->Vorlagen[xx].FontEffect) && |
(vg.FColor == doc->Vorlagen[xx].FColor) && |
(vg.FShade == doc->Vorlagen[xx].FShade) && |
(vg.SColor == doc->Vorlagen[xx].SColor) && |
(vg.SShade == doc->Vorlagen[xx].SShade) && |
(vg.BaseAdj == doc->Vorlagen[xx].BaseAdj) && |
(vg.FontSize == doc->Vorlagen[xx].FontSize)) |
{ |
DoVorl[VorlC] = tmV.setNum(xx); |
VorlC++; |
fou = true; |
} |
else |
{ |
vg.Vname = "Copy of "+doc->Vorlagen[xx].Vname; |
fou = false; |
} |
break; |
} |
} |
if (!fou) |
{ |
for (uint xx=0; xx<doc->Vorlagen.count(); ++xx) |
{ |
if ((vg.LineSpa == doc->Vorlagen[xx].LineSpa) && |
(vg.Indent == doc->Vorlagen[xx].Indent) && |
(vg.First == doc->Vorlagen[xx].First) && |
(vg.Ausri == doc->Vorlagen[xx].Ausri) && |
(vg.Avor == doc->Vorlagen[xx].Avor) && |
(vg.Anach == doc->Vorlagen[xx].Anach) && |
(vg.Font == doc->Vorlagen[xx].Font) && |
(vg.TabValues == doc->Vorlagen[xx].TabValues) && |
(vg.Drop == doc->Vorlagen[xx].Drop) && |
(vg.DropLin == doc->Vorlagen[xx].DropLin) && |
(vg.FontEffect == doc->Vorlagen[xx].FontEffect) && |
(vg.FColor == doc->Vorlagen[xx].FColor) && |
(vg.FShade == doc->Vorlagen[xx].FShade) && |
(vg.SColor == doc->Vorlagen[xx].SColor) && |
(vg.SShade == doc->Vorlagen[xx].SShade) && |
(vg.BaseAdj == doc->Vorlagen[xx].BaseAdj) && |
(vg.FontSize == doc->Vorlagen[xx].FontSize)) |
{ |
vg.Vname = doc->Vorlagen[xx].Vname; |
DoVorl[VorlC] = tmV.setNum(xx); |
VorlC++; |
fou = true; |
break; |
} |
} |
} |
if (!fou) |
{ |
doc->Vorlagen.append(vg); |
DoVorl[VorlC] = tmV.setNum(doc->Vorlagen.count()-1); |
VorlC++; |
} |
} |
if(pg.tagName()=="JAVA") |
doc->JavaScripts[pg.attribute("NAME")] = pg.attribute("SCRIPT"); |
686,126 → 1001,16 |
LFrames.append(Link); |
} |
} |
OB.PType = QStoInt(obj.attribute("PTYPE")); |
GetItemProps(newVersion, &obj, &OB); |
OB.Xpos = QStodouble(obj.attribute("XPOS")); |
OB.Ypos=QStodouble(obj.attribute("YPOS")); |
OB.Width=QStodouble(obj.attribute("WIDTH")); |
OB.Height=QStodouble(obj.attribute("HEIGHT")); |
OB.RadRect = QStodouble(obj.attribute("RADRECT","0")); |
OB.ClipEdited = QStoInt(obj.attribute("CLIPEDIT", "0")); |
OB.FrameType = QStoInt(obj.attribute("FRTYPE", "0")); |
OB.Pwidth=QStodouble(obj.attribute("PWIDTH")); |
OB.Pcolor=obj.attribute("PCOLOR"); |
if ((!newVersion) && (OB.PType == 4)) |
{ |
OB.TxtFill = obj.attribute("PCOLOR2"); |
OB.Pcolor2 = "None"; |
} |
else |
{ |
OB.Pcolor2 = obj.attribute("PCOLOR2"); |
OB.TxtFill = obj.attribute("TXTFILL", "Black"); |
} |
OB.NamedLStyle = obj.attribute("NAMEDLST", ""); |
if (!doc->MLineStyles.contains(OB.NamedLStyle)) |
OB.NamedLStyle = ""; |
OB.Shade=QStoInt(obj.attribute("SHADE")); |
OB.Shade2=QStoInt(obj.attribute("SHADE2")); |
OB.TxtStroke=obj.attribute("TXTSTROKE", "None"); |
OB.ShTxtFill=QStoInt(obj.attribute("TXTFILLSH", "100")); |
OB.ShTxtStroke=QStoInt(obj.attribute("TXTSTRSH", "100")); |
OB.TxtScale=QStoInt(obj.attribute("TXTSCALE", "100")); |
OB.TxTStyle=QStoInt(obj.attribute("TXTSTYLE", "0")); |
OB.Cols = QStoInt(obj.attribute("COLUMNS","1")); |
OB.ColGap = QStodouble(obj.attribute("COLGAP","0.0")); |
OB.GrType = QStoInt(obj.attribute("GRTYP","0")); |
OB.fill_gradient.clearStops(); |
if (OB.GrType != 0) |
{ |
OB.GrStartX = QStodouble(obj.attribute("GRSTARTX","0.0")); |
OB.GrStartY = QStodouble(obj.attribute("GRSTARTY","0.0")); |
OB.GrEndX = QStodouble(obj.attribute("GRENDX","0.0")); |
OB.GrEndY = QStodouble(obj.attribute("GRENDY","0.0")); |
OB.GrColor = obj.attribute("GRCOLOR",""); |
if (OB.GrColor != "") |
{ |
OB.GrColor2 = obj.attribute("GRCOLOR2",""); |
OB.GrShade = QStoInt(obj.attribute("GRSHADE","100")); |
OB.GrShade2 = QStoInt(obj.attribute("GRSHADE2","100")); |
} |
} |
OB.Rot=QStodouble(obj.attribute("ROT")); |
OB.PLineArt=Qt::PenStyle(QStoInt(obj.attribute("PLINEART"))); |
OB.PLineEnd=Qt::PenCapStyle(QStoInt(obj.attribute("PLINEEND","0"))); |
OB.PLineJoin=Qt::PenJoinStyle(QStoInt(obj.attribute("PLINEJOIN","0"))); |
OB.LineSp=QStodouble(obj.attribute("LINESP")); |
OB.ExtraV=QStodouble(obj.attribute("EXTRAV","0")); |
OB.LocalScX=QStodouble(obj.attribute("LOCALSCX")); |
OB.LocalScY=QStodouble(obj.attribute("LOCALSCY")); |
OB.LocalX=QStodouble(obj.attribute("LOCALX")); |
OB.LocalY=QStodouble(obj.attribute("LOCALY")); |
OB.PicArt=QStoInt(obj.attribute("PICART")); |
OB.flippedH=QStoInt(obj.attribute("FLIPPEDH")); |
OB.flippedV=QStoInt(obj.attribute("FLIPPEDV")); |
OB.BBoxX=QStodouble(obj.attribute("BBOXX")); |
OB.BBoxH=QStodouble(obj.attribute("BBOXH")); |
OB.ScaleType = QStoInt(obj.attribute("SCALETYPE","1")); |
OB.AspectRatio = QStoInt(obj.attribute("RATIO","0")); |
OB.isPrintable=QStoInt(obj.attribute("PRINTABLE")); |
OB.isBookmark=QStoInt(obj.attribute("BOOKMARK")); |
if ((OB.isBookmark) && (doc->BookMarks.count() == 0)) |
doc->OldBM = true; |
OB.BMnr = QStoInt(obj.attribute("BookNr","0")); |
OB.isAnnotation=QStoInt(obj.attribute("ANNOTATION","0")); |
OB.AnType = QStoInt(obj.attribute("ANTYPE","0")); |
OB.AnAction = obj.attribute("ANACTION",""); |
OB.An_E_act = obj.attribute("ANEACT",""); |
OB.An_X_act = obj.attribute("ANXACT",""); |
OB.An_D_act = obj.attribute("ANDACT",""); |
OB.An_Fo_act = obj.attribute("ANFOACT",""); |
OB.An_Bl_act = obj.attribute("ANBLACT",""); |
OB.An_K_act = obj.attribute("ANKACT",""); |
OB.An_F_act = obj.attribute("ANFACT",""); |
OB.An_V_act = obj.attribute("ANVACT",""); |
OB.An_C_act = obj.attribute("ANCACT",""); |
OB.AnActType = QStoInt(obj.attribute("ANACTYP","0")); |
OB.An_Extern = obj.attribute("ANEXTERN",""); |
if ((OB.An_Extern != "") && (OB.AnActType != 8)) |
{ |
QFileInfo efp(OB.An_Extern); |
OB.An_Extern = efp.absFilePath(); |
} |
OB.AnZiel = QStoInt(obj.attribute("ANZIEL","0")); |
OB.AnName = obj.attribute("ANNAME",""); |
OB.AnToolTip = obj.attribute("ANTOOLTIP",""); |
OB.AnRollOver = obj.attribute("ANROLL",""); |
OB.AnDown = obj.attribute("ANDOWN",""); |
OB.AnBwid = QStoInt(obj.attribute("ANBWID","1")); |
OB.AnBsty = QStoInt(obj.attribute("ANBSTY","0")); |
OB.AnFeed = QStoInt(obj.attribute("ANFEED","1")); |
OB.AnFlag = QStoInt(obj.attribute("ANFLAG","0")); |
OB.AnFont = QStoInt(obj.attribute("ANFONT","4")); |
OB.AnFormat = QStoInt(obj.attribute("ANFORMAT","0")); |
OB.AnVis = QStoInt(obj.attribute("ANVIS","0")); |
OB.AnIsChk = static_cast<bool>(QStoInt(obj.attribute("ANCHK","0"))); |
OB.AnAAact = static_cast<bool>(QStoInt(obj.attribute("ANAA","0"))); |
OB.AnHTML = static_cast<bool>(QStoInt(obj.attribute("ANHTML","0"))); |
OB.AnUseIcons = static_cast<bool>(QStoInt(obj.attribute("ANICON","0"))); |
OB.AnChkStil = QStoInt(obj.attribute("ANCHKS","0")); |
OB.AnMaxChar = QStoInt(obj.attribute("ANMC","-1")); |
OB.AnBColor = obj.attribute("ANBCOL","None"); |
OB.AnIPlace = QStoInt(obj.attribute("ANPLACE","1")); |
OB.AnScaleW = QStoInt(obj.attribute("ANSCALE","0")); |
if (QStoInt(obj.attribute("TRANSPARENT","0")) == 1) |
OB.Pcolor = "None"; |
OB.Textflow=QStoInt(obj.attribute("TEXTFLOW")); |
OB.Textflow2=QStoInt(obj.attribute("TEXTFLOW2","0")); |
OB.Extra=QStodouble(obj.attribute("EXTRA")); |
OB.TExtra=QStodouble(obj.attribute("TEXTRA", "1")); |
OB.BExtra=QStodouble(obj.attribute("BEXTRA", "1")); |
OB.RExtra=QStodouble(obj.attribute("REXTRA", "1")); |
OB.PoShow = QStoInt(obj.attribute("PTLSHOW","0")); |
OB.BaseOffs = QStodouble(obj.attribute("BASEOF","0")); |
OB.Ausrich = DoVorl[QStoInt(obj.attribute("ALIGN","0"))].toUInt(); |
tmpf = obj.attribute("IFONT", doc->Dfont); |
if (tmpf == "") |
812,86 → 1017,12 |
tmpf = doc->Dfont; |
tmf = tmpf; |
if (!DoFonts.contains(tmpf)) |
{ |
if ((!avail.find(tmpf)) || (!avail[tmpf]->UseFont)) |
{ |
if ((!view->Prefs->GFontSub.contains(tmpf)) || (!avail[view->Prefs->GFontSub[tmpf]]->UseFont)) |
{ |
qApp->setOverrideCursor(QCursor(arrowCursor), true); |
DmF *dia = new DmF(view, tmpf, view->Prefs); |
dia->exec(); |
tmpf = dia->Ersatz; |
delete dia; |
qApp->setOverrideCursor(QCursor(waitCursor), true); |
view->Prefs->GFontSub[tmf] = tmpf; |
} |
else |
tmpf = view->Prefs->GFontSub[tmf]; |
} |
fo = avail[tmpf]->Font; |
fo.setPointSize(qRound(doc->Dsize / 10.0)); |
doc->AddFont(tmpf, fo); |
DoFonts[tmf] = tmpf; |
} |
tmpf = AskForFont(avail, tmpf, view->Prefs, doc); |
else |
tmpf = DoFonts[tmf]; |
OB.IFont = tmpf; |
OB.ISize = qRound(QStodouble(obj.attribute("ISIZE","12")) * 10.0); |
OB.Pfile=obj.attribute("PFILE"); |
OB.Pfile2=obj.attribute("PFILE2",""); |
OB.Pfile3=obj.attribute("PFILE3",""); |
OB.IProfile=obj.attribute("PRFILE",""); |
OB.EmProfile=obj.attribute("EPROF",""); |
OB.IRender = QStoInt(obj.attribute("IRENDER","1")); |
OB.UseEmbedded = QStoInt(obj.attribute("EMBEDDED","1")); |
OB.Locked = static_cast<bool>(QStoInt(obj.attribute("LOCK","0"))); |
OB.LockRes = static_cast<bool>(QStoInt(obj.attribute("LOCKR","0"))); |
OB.Reverse = static_cast<bool>(QStoInt(obj.attribute("REVERS","0"))); |
OB.InvPict = static_cast<bool>(QStoInt(obj.attribute("INVERS","0"))); |
OB.isTableItem = static_cast<bool>(QStoInt(obj.attribute("isTableItem","0"))); |
OB.TopLine = static_cast<bool>(QStoInt(obj.attribute("TopLine","0"))); |
OB.LeftLine = static_cast<bool>(QStoInt(obj.attribute("LeftLine","0"))); |
OB.RightLine = static_cast<bool>(QStoInt(obj.attribute("RightLine","0"))); |
OB.BottomLine = static_cast<bool>(QStoInt(obj.attribute("BottomLine","0"))); |
OB.TopLinkID = QStoInt(obj.attribute("TopLINK","-1")); |
OB.LeftLinkID = QStoInt(obj.attribute("LeftLINK","-1")); |
OB.RightLinkID = QStoInt(obj.attribute("RightLINK","-1")); |
OB.BottomLinkID = QStoInt(obj.attribute("BottomLINK","-1")); |
OB.LayerNr = QStoInt(obj.attribute("LAYER","0")); |
OB.Language = obj.attribute("LANGUAGE", doc->Language); |
OB.Transparency = QStodouble(obj.attribute("TransValue","0.0")); |
if (obj.hasAttribute("TransValueS")) |
OB.TranspStroke = QStodouble(obj.attribute("TransValueS","0.0")); |
else |
OB.TranspStroke = OB.Transparency; |
if (obj.hasAttribute("NUMCLIP")) |
{ |
OB.Clip.resize(obj.attribute("NUMCLIP").toUInt()); |
tmp = obj.attribute("CLIPCOOR"); |
QTextStream fc(&tmp, IO_ReadOnly); |
for (uint c=0; c<obj.attribute("NUMCLIP").toUInt(); ++c) |
{ |
fc >> x; |
fc >> y; |
OB.Clip.setPoint(c, x, y); |
} |
} |
else |
OB.Clip.resize(0); |
if (obj.hasAttribute("NUMPO")) |
{ |
OB.PoLine.resize(obj.attribute("NUMPO").toUInt()); |
tmp = obj.attribute("POCOOR"); |
QTextStream fp(&tmp, IO_ReadOnly); |
for (uint cx=0; cx<obj.attribute("NUMPO").toUInt(); ++cx) |
{ |
fp >> xf; |
fp >> yf; |
OB.PoLine.setPoint(cx, xf, yf); |
} |
} |
else |
OB.PoLine.resize(0); |
tmp = ""; |
if ((obj.hasAttribute("GROUPS")) && (QStoInt(obj.attribute("NUMGROUP","0")) != 0)) |
{ |
907,35 → 1038,6 |
} |
else |
OB.Groups.clear(); |
if ((obj.hasAttribute("NUMTAB")) && (QStoInt(obj.attribute("NUMTAB","0")) != 0)) |
{ |
tmp = obj.attribute("TABS"); |
QTextStream tgv(&tmp, IO_ReadOnly); |
OB.TabValues.clear(); |
for (int cxv = 0; cxv < QStoInt(obj.attribute("NUMTAB","0")); ++cxv) |
{ |
tgv >> xf; |
OB.TabValues.append(xf); |
} |
tmp = ""; |
} |
else |
OB.TabValues.clear(); |
if ((obj.hasAttribute("NUMDASH")) && (QStoInt(obj.attribute("NUMDASH","0")) != 0)) |
{ |
tmp = obj.attribute("DASHS"); |
QTextStream dgv(&tmp, IO_ReadOnly); |
OB.DashValues.clear(); |
for (int cxv = 0; cxv < QStoInt(obj.attribute("NUMDASH","0")); ++cxv) |
{ |
dgv >> xf; |
OB.DashValues.append(xf); |
} |
tmp = ""; |
} |
else |
OB.DashValues.clear(); |
OB.DashOffset = QStodouble(obj.attribute("DASHOFF","0.0")); |
QDomNode IT=OBJ.firstChild(); |
while(!IT.isNull()) |
{ |
949,61 → 1051,8 |
OB.fill_gradient.addStop(SetFarbe(doc, name, shade), ramp, 0.5, opa, name, shade); |
} |
if (it.tagName()=="ITEXT") |
{ |
tmp2 = it.attribute("CH"); |
tmp2.replace(QRegExp("\r"), QChar(5)); |
tmp2.replace(QRegExp("\n"), QChar(5)); |
tmp2.replace(QRegExp("\t"), QChar(4)); |
tmpf = it.attribute("CFONT", doc->Dfont); |
if (tmpf == "") |
tmpf = doc->Dfont; |
tmf = tmpf; |
if (!DoFonts.contains(tmpf)) |
{ |
if ((!avail.find(tmpf)) || (!avail[tmpf]->UseFont)) |
{ |
if ((!view->Prefs->GFontSub.contains(tmpf)) || (!avail[view->Prefs->GFontSub[tmpf]]->UseFont)) |
{ |
qApp->setOverrideCursor(QCursor(arrowCursor), true); |
DmF *dia = new DmF(view, tmpf, view->Prefs); |
dia->exec(); |
tmpf = dia->Ersatz; |
delete dia; |
qApp->setOverrideCursor(QCursor(waitCursor), true); |
view->Prefs->GFontSub[tmf] = tmpf; |
} |
else |
tmpf = view->Prefs->GFontSub[tmpf]; |
} |
fo = avail[tmpf]->Font; |
fo.setPointSize(qRound(doc->Dsize / 10.0)); |
doc->AddFont(tmpf, fo); |
DoFonts[tmf] = tmpf; |
} |
else |
tmpf = DoFonts[tmf]; |
tmp3 = "\t" + tmpf + "\t"; |
tmp3 += it.attribute("CSIZE") + "\t"; |
tmp3 += it.attribute("CCOLOR") + "\t"; |
tmp3 += it.attribute("CEXTRA") + "\t"; |
tmp3 += it.attribute("CSHADE") + "\t"; |
tmp3 += it.attribute("CSTYLE") + "\t"; |
if (VorLFound) |
tmp3 += DoVorl[it.attribute("CAB","0").toUInt()] + "\t"; |
else |
{ |
if (it.attribute("CAB","0").toUInt() < 5) |
tmp3 += it.attribute("CAB","0")+"\t"; |
else |
tmp3 += "0\t"; |
} |
tmp3 += it.attribute("CSTROKE","None") + "\t"; |
tmp3 += it.attribute("CSHADE2","100") + "\t"; |
tmp3 += it.attribute("CSCALE","100") + "\n"; |
for (uint cxx=0; cxx<tmp2.length(); ++cxx) |
tmp += tmp2.at(cxx)+tmp3; |
} |
IT=IT.nextSibling(); |
tmp += GetItemText(&it, doc, view->Prefs, VorLFound, true); |
IT=IT.nextSibling(); |
} |
OB.Ptext = tmp; |
if ((OB.PType == 5) && (OB.Height != 0)) |
1077,7 → 1126,6 |
} |
Its->NextBox = 0; |
Itr->Dirty = true; |
// Itr->paintObj(); |
} |
} |
if (!Mpage) |
1103,11 → 1151,10 |
struct Linked Link; |
QString tmp, tmpf, tmp2, tmp3, tmp4, PgNam, Defont, tmf; |
QFont fo; |
QMap<QString,QString> DoFonts; |
QMap<int,int> TableID; |
QPtrList<PageItem> TableItems; |
int x, y, a; |
double xf, yf; |
int x, a; |
double xf; |
PageItem *Neu; |
LFrames.clear(); |
QDomDocument docu("scridoc"); |
1239,27 → 1286,7 |
tmpf = doc->Dfont; |
tmf = tmpf; |
if (!DoFonts.contains(tmpf)) |
{ |
if ((!avail.find(tmpf)) || (!avail[tmpf]->UseFont)) |
{ |
if ((!view->Prefs->GFontSub.contains(tmpf)) || (!avail[view->Prefs->GFontSub[tmpf]]->UseFont)) |
{ |
qApp->setOverrideCursor(QCursor(arrowCursor), true); |
DmF *dia = new DmF(view, tmpf, view->Prefs); |
dia->exec(); |
tmpf = dia->Ersatz; |
delete dia; |
qApp->setOverrideCursor(QCursor(waitCursor), true); |
view->Prefs->GFontSub[tmf] = tmpf; |
} |
else |
tmpf = view->Prefs->GFontSub[tmpf]; |
} |
fo = avail[tmpf]->Font; |
fo.setPointSize(qRound(doc->Dsize / 10.0)); |
doc->AddFont(tmpf, fo); |
DoFonts[tmf] = tmpf; |
} |
tmpf = AskForFont(avail, tmpf, view->Prefs, doc); |
else |
tmpf = DoFonts[tmf]; |
vg.Font = tmpf; |
1414,124 → 1441,14 |
LFrames.append(Link); |
} |
} |
OB.PType = QStoInt(obj.attribute("PTYPE")); |
GetItemProps(newVersion, &obj, &OB); |
OB.Xpos = QStodouble(obj.attribute("XPOS")); |
OB.Ypos=QStodouble(obj.attribute("YPOS")); |
OB.Width=QStodouble(obj.attribute("WIDTH")); |
OB.Height=QStodouble(obj.attribute("HEIGHT")); |
OB.RadRect = QStodouble(obj.attribute("RADRECT","0")); |
OB.ClipEdited = QStoInt(obj.attribute("CLIPEDIT", "0")); |
OB.FrameType = QStoInt(obj.attribute("FRTYPE", "0")); |
OB.Pwidth=QStodouble(obj.attribute("PWIDTH")); |
OB.Pcolor=obj.attribute("PCOLOR"); |
if ((!newVersion) && (OB.PType == 4)) |
{ |
OB.TxtFill = obj.attribute("PCOLOR2"); |
OB.Pcolor2 = "None"; |
} |
else |
{ |
OB.Pcolor2 = obj.attribute("PCOLOR2"); |
OB.TxtFill = obj.attribute("TXTFILL", "Black"); |
} |
OB.NamedLStyle = obj.attribute("NAMEDLST", ""); |
OB.Shade=QStoInt(obj.attribute("SHADE")); |
OB.Shade2=QStoInt(obj.attribute("SHADE2")); |
OB.TxtStroke=obj.attribute("TXTSTROKE", "None"); |
OB.ShTxtFill=QStoInt(obj.attribute("TXTFILLSH", "100")); |
OB.ShTxtStroke=QStoInt(obj.attribute("TXTSTRSH", "100")); |
OB.TxtScale=QStoInt(obj.attribute("TXTSCALE", "100")); |
OB.TxTStyle=QStoInt(obj.attribute("TXTSTYLE", "0")); |
OB.Cols = QStoInt(obj.attribute("COLUMNS","1")); |
OB.ColGap = QStodouble(obj.attribute("COLGAP","0.0")); |
OB.GrType = QStoInt(obj.attribute("GRTYP","0")); |
OB.fill_gradient.clearStops(); |
if (OB.GrType != 0) |
{ |
OB.GrStartX = QStodouble(obj.attribute("GRSTARTX","0.0")); |
OB.GrStartY = QStodouble(obj.attribute("GRSTARTY","0.0")); |
OB.GrEndX = QStodouble(obj.attribute("GRENDX","0.0")); |
OB.GrEndY = QStodouble(obj.attribute("GRENDY","0.0")); |
OB.GrColor = obj.attribute("GRCOLOR",""); |
if (OB.GrColor != "") |
{ |
OB.GrColor2 = obj.attribute("GRCOLOR2",""); |
OB.GrShade = QStoInt(obj.attribute("GRSHADE","100")); |
OB.GrShade2 = QStoInt(obj.attribute("GRSHADE2","100")); |
} |
} |
OB.Rot=QStodouble(obj.attribute("ROT")); |
OB.PLineArt=Qt::PenStyle(QStoInt(obj.attribute("PLINEART"))); |
OB.PLineEnd=Qt::PenCapStyle(QStoInt(obj.attribute("PLINEEND","0"))); |
OB.PLineJoin=Qt::PenJoinStyle(QStoInt(obj.attribute("PLINEJOIN","0"))); |
OB.LineSp=QStodouble(obj.attribute("LINESP")); |
OB.ExtraV=QStodouble(obj.attribute("EXTRAV","0")); |
OB.LocalScX=QStodouble(obj.attribute("LOCALSCX")); |
OB.LocalScY=QStodouble(obj.attribute("LOCALSCY")); |
OB.LocalX=QStodouble(obj.attribute("LOCALX")); |
OB.LocalY=QStodouble(obj.attribute("LOCALY")); |
OB.PicArt=QStoInt(obj.attribute("PICART")); |
OB.flippedH=QStoInt(obj.attribute("FLIPPEDH")); |
OB.flippedV=QStoInt(obj.attribute("FLIPPEDV")); |
OB.BBoxX=QStodouble(obj.attribute("BBOXX")); |
OB.BBoxH=QStodouble(obj.attribute("BBOXH")); |
OB.ScaleType = QStoInt(obj.attribute("SCALETYPE","1")); |
OB.AspectRatio = QStoInt(obj.attribute("RATIO","0")); |
OB.isPrintable=QStoInt(obj.attribute("PRINTABLE")); |
OB.isBookmark=QStoInt(obj.attribute("BOOKMARK")); |
if ((OB.isBookmark) && (doc->BookMarks.count() == 0)) |
doc->OldBM = true; |
OB.BMnr = QStoInt(obj.attribute("BookNr","0")); |
OB.isAnnotation=QStoInt(obj.attribute("ANNOTATION","0")); |
OB.AnType = QStoInt(obj.attribute("ANTYPE","0")); |
OB.AnAction = obj.attribute("ANACTION",""); |
OB.An_E_act = obj.attribute("ANEACT",""); |
OB.An_X_act = obj.attribute("ANXACT",""); |
OB.An_D_act = obj.attribute("ANDACT",""); |
OB.An_Fo_act = obj.attribute("ANFOACT",""); |
OB.An_Bl_act = obj.attribute("ANBLACT",""); |
OB.An_K_act = obj.attribute("ANKACT",""); |
OB.An_F_act = obj.attribute("ANFACT",""); |
OB.An_V_act = obj.attribute("ANVACT",""); |
OB.An_C_act = obj.attribute("ANCACT",""); |
OB.AnActType = QStoInt(obj.attribute("ANACTYP","0")); |
OB.An_Extern = obj.attribute("ANEXTERN",""); |
if ((OB.An_Extern != "") && (OB.AnActType != 8)) |
{ |
QFileInfo efp(OB.An_Extern); |
OB.An_Extern = efp.absFilePath(); |
} |
OB.AnZiel = QStoInt(obj.attribute("ANZIEL","0")); |
OB.AnName = obj.attribute("ANNAME",""); |
OB.AnToolTip = obj.attribute("ANTOOLTIP",""); |
OB.AnRollOver = obj.attribute("ANROLL",""); |
OB.AnDown = obj.attribute("ANDOWN",""); |
OB.AnBwid = QStoInt(obj.attribute("ANBWID","1")); |
OB.AnBsty = QStoInt(obj.attribute("ANBSTY","0")); |
OB.AnFeed = QStoInt(obj.attribute("ANFEED","1")); |
OB.AnFlag = QStoInt(obj.attribute("ANFLAG","0")); |
OB.AnFont = QStoInt(obj.attribute("ANFONT","4")); |
OB.AnFormat = QStoInt(obj.attribute("ANFORMAT","0")); |
OB.AnVis = QStoInt(obj.attribute("ANVIS","0")); |
OB.AnIsChk = static_cast<bool>(QStoInt(obj.attribute("ANCHK","0"))); |
OB.AnAAact = static_cast<bool>(QStoInt(obj.attribute("ANAA","0"))); |
OB.AnHTML = static_cast<bool>(QStoInt(obj.attribute("ANHTML","0"))); |
OB.AnUseIcons = static_cast<bool>(QStoInt(obj.attribute("ANICON","0"))); |
OB.AnChkStil = QStoInt(obj.attribute("ANCHKS","0")); |
OB.AnMaxChar = QStoInt(obj.attribute("ANMC","-1")); |
OB.AnBColor = obj.attribute("ANBCOL","None"); |
OB.AnIPlace = QStoInt(obj.attribute("ANPLACE","1")); |
OB.AnScaleW = QStoInt(obj.attribute("ANSCALE","0")); |
if (QStoInt(obj.attribute("TRANSPARENT","0")) == 1) |
OB.Pcolor = "None"; |
OB.Textflow=QStoInt(obj.attribute("TEXTFLOW")); |
OB.Textflow2=QStoInt(obj.attribute("TEXTFLOW2","0")); |
OB.Extra=QStodouble(obj.attribute("EXTRA")); |
OB.TExtra=QStodouble(obj.attribute("TEXTRA", "1")); |
OB.BExtra=QStodouble(obj.attribute("BEXTRA", "1")); |
OB.RExtra=QStodouble(obj.attribute("REXTRA", "1")); |
OB.PoShow = QStoInt(obj.attribute("PTLSHOW","0")); |
OB.BaseOffs = QStodouble(obj.attribute("BASEOF","0")); |
OB.Ausrich = QStoInt(obj.attribute("ALIGN","0")); |
tmpf = obj.attribute("IFONT", doc->Dfont); |
if (tmpf == "") |
1538,86 → 1455,12 |
tmpf = doc->Dfont; |
tmf = tmpf; |
if (!DoFonts.contains(tmpf)) |
{ |
if ((!avail.find(tmpf)) || (!avail[tmpf]->UseFont)) |
{ |
if ((!view->Prefs->GFontSub.contains(tmpf)) || (!avail[view->Prefs->GFontSub[tmpf]]->UseFont)) |
{ |
qApp->setOverrideCursor(QCursor(arrowCursor), true); |
DmF *dia = new DmF(view, tmpf, view->Prefs); |
dia->exec(); |
tmpf = dia->Ersatz; |
delete dia; |
qApp->setOverrideCursor(QCursor(waitCursor), true); |
view->Prefs->GFontSub[tmf] = tmpf; |
} |
else |
tmpf = view->Prefs->GFontSub[tmpf]; |
} |
fo = avail[tmpf]->Font; |
fo.setPointSize(qRound(doc->Dsize / 10.0)); |
doc->AddFont(tmpf, fo); |
DoFonts[tmf] = tmpf; |
} |
tmpf = AskForFont(avail, tmpf, view->Prefs, doc); |
else |
tmpf = DoFonts[tmf]; |
OB.IFont = tmpf; |
OB.ISize = qRound(QStodouble(obj.attribute("ISIZE","12")) * 10); |
OB.Pfile=obj.attribute("PFILE"); |
OB.Pfile2=obj.attribute("PFILE2",""); |
OB.Pfile3=obj.attribute("PFILE3",""); |
OB.IProfile=obj.attribute("PRFILE",""); |
OB.EmProfile=obj.attribute("EPROF",""); |
OB.IRender = QStoInt(obj.attribute("IRENDER","1")); |
OB.UseEmbedded = QStoInt(obj.attribute("EMBEDDED","1")); |
OB.Locked = static_cast<bool>(QStoInt(obj.attribute("LOCK","0"))); |
OB.LockRes = static_cast<bool>(QStoInt(obj.attribute("LOCKR","0"))); |
OB.Reverse = static_cast<bool>(QStoInt(obj.attribute("REVERS","0"))); |
OB.InvPict = static_cast<bool>(QStoInt(obj.attribute("INVERS","0"))); |
OB.isTableItem = static_cast<bool>(QStoInt(obj.attribute("isTableItem","0"))); |
OB.TopLine = static_cast<bool>(QStoInt(obj.attribute("TopLine","0"))); |
OB.LeftLine = static_cast<bool>(QStoInt(obj.attribute("LeftLine","0"))); |
OB.RightLine = static_cast<bool>(QStoInt(obj.attribute("RightLine","0"))); |
OB.BottomLine = static_cast<bool>(QStoInt(obj.attribute("BottomLine","0"))); |
OB.TopLinkID = QStoInt(obj.attribute("TopLINK","-1")); |
OB.LeftLinkID = QStoInt(obj.attribute("LeftLINK","-1")); |
OB.RightLinkID = QStoInt(obj.attribute("RightLINK","-1")); |
OB.BottomLinkID = QStoInt(obj.attribute("BottomLINK","-1")); |
OB.LayerNr = QStoInt(obj.attribute("LAYER","0")); |
OB.Language = obj.attribute("LANGUAGE", doc->Language); |
OB.Transparency = QStodouble(obj.attribute("TransValue","0.0")); |
if (obj.hasAttribute("TransValueS")) |
OB.TranspStroke = QStodouble(obj.attribute("TransValueS","0.0")); |
else |
OB.TranspStroke = OB.Transparency; |
if (obj.hasAttribute("NUMCLIP")) |
{ |
OB.Clip.resize(obj.attribute("NUMCLIP").toUInt()); |
tmp = obj.attribute("CLIPCOOR"); |
QTextStream fc(&tmp, IO_ReadOnly); |
for (uint c=0; c<obj.attribute("NUMCLIP").toUInt(); ++c) |
{ |
fc >> x; |
fc >> y; |
OB.Clip.setPoint(c, x, y); |
} |
} |
else |
OB.Clip.resize(0); |
if (obj.hasAttribute("NUMPO")) |
{ |
OB.PoLine.resize(obj.attribute("NUMPO").toUInt()); |
tmp = obj.attribute("POCOOR"); |
QTextStream fp(&tmp, IO_ReadOnly); |
for (uint cx=0; cx<obj.attribute("NUMPO").toUInt(); ++cx) |
{ |
fp >> xf; |
fp >> yf; |
OB.PoLine.setPoint(cx, xf, yf); |
} |
} |
else |
OB.PoLine.resize(0); |
tmp = ""; |
if ((obj.hasAttribute("GROUPS")) && (QStoInt(obj.attribute("NUMGROUP","0")) != 0)) |
{ |
1633,35 → 1476,6 |
} |
else |
OB.Groups.clear(); |
if ((obj.hasAttribute("NUMTAB")) && (QStoInt(obj.attribute("NUMTAB","0")) != 0)) |
{ |
tmp = obj.attribute("TABS"); |
QTextStream tgv(&tmp, IO_ReadOnly); |
OB.TabValues.clear(); |
for (int cxv = 0; cxv < QStoInt(obj.attribute("NUMTAB","0")); ++cxv) |
{ |
tgv >> xf; |
OB.TabValues.append(xf); |
} |
tmp = ""; |
} |
else |
OB.TabValues.clear(); |
if ((obj.hasAttribute("NUMDASH")) && (QStoInt(obj.attribute("NUMDASH","0")) != 0)) |
{ |
tmp = obj.attribute("DASHS"); |
QTextStream dgv(&tmp, IO_ReadOnly); |
OB.DashValues.clear(); |
for (int cxv = 0; cxv < QStoInt(obj.attribute("NUMDASH","0")); ++cxv) |
{ |
dgv >> xf; |
OB.DashValues.append(xf); |
} |
tmp = ""; |
} |
else |
OB.DashValues.clear(); |
OB.DashOffset = QStodouble(obj.attribute("DASHOFF","0.0")); |
QDomNode IT=OBJ.firstChild(); |
while(!IT.isNull()) |
{ |
1675,52 → 1489,7 |
OB.fill_gradient.addStop(SetFarbe(doc, name, shade), ramp, 0.5, opa, name, shade); |
} |
if (it.tagName()=="ITEXT") |
{ |
tmp2 = it.attribute("CH"); |
tmp2.replace(QRegExp("\r"), QChar(5)); |
tmp2.replace(QRegExp("\n"), QChar(5)); |
tmp2.replace(QRegExp("\t"), QChar(4)); |
tmpf = it.attribute("CFONT", doc->Dfont); |
if (tmpf == "") |
tmpf = doc->Dfont; |
tmf = tmpf; |
if (!DoFonts.contains(tmpf)) |
{ |
if ((!avail.find(tmpf)) || (!avail[tmpf]->UseFont)) |
{ |
if ((!view->Prefs->GFontSub.contains(tmpf)) || (!avail[view->Prefs->GFontSub[tmpf]]->UseFont)) |
{ |
qApp->setOverrideCursor(QCursor(arrowCursor), true); |
DmF *dia = new DmF(view, tmpf, view->Prefs); |
dia->exec(); |
tmpf = dia->Ersatz; |
delete dia; |
qApp->setOverrideCursor(QCursor(waitCursor), true); |
view->Prefs->GFontSub[tmf] = tmpf; |
} |
else |
tmpf = view->Prefs->GFontSub[tmpf]; |
} |
fo = avail[tmpf]->Font; |
fo.setPointSize(qRound(doc->Dsize / 10.0)); |
doc->AddFont(tmpf, fo); |
DoFonts[tmf] = tmpf; |
} |
else |
tmpf = DoFonts[tmf]; |
tmp3 = "\t" + tmpf + "\t"; |
tmp3 += it.attribute("CSIZE") + "\t"; |
tmp3 += it.attribute("CCOLOR") + "\t"; |
tmp3 += it.attribute("CEXTRA") + "\t"; |
tmp3 += it.attribute("CSHADE") + "\t"; |
tmp3 += it.attribute("CSTYLE") + "\t"; |
tmp3 += it.attribute("CAB","0") + "\t"; |
tmp3 += it.attribute("CSTROKE","None") + "\t"; |
tmp3 += it.attribute("CSHADE2","100") + "\t"; |
tmp3 += it.attribute("CSCALE","100") + "\n"; |
for (uint cxx=0; cxx<tmp2.length(); ++cxx) |
tmp += tmp2.at(cxx)+tmp3; |
} |
tmp += GetItemText(&it, doc, view->Prefs, false, false); |
IT=IT.nextSibling(); |
} |
OB.Ptext = tmp; |
1934,17 → 1703,13 |
struct StVorL vg; |
QString tmp, tmpf, tmp2, tmp3, tmp4, f, tmV, tmf; |
QFont fo; |
QMap<QString,QString> DoFonts; |
QMap<uint,QString> DoVorl; |
QMap<QString,QString> DoMul; |
QMap<int,int> TableID; |
QPtrList<PageItem> TableItems; |
uint VorlC; |
bool fou; |
bool VorLFound = false; |
bool newVersion = false; |
int x, y; |
double GrX, GrY, xf, yf; |
int x; |
double GrX, GrY; |
int GrMax = doc->GroupCounter; |
CMYKColor lf = CMYKColor(); |
QDomDocument docu("scridoc"); |
2055,114 → 1820,8 |
} |
if(pg.tagName()=="STYLE") |
{ |
fou = false; |
GetStyle(&pg, &vg, doc->Vorlagen, doc, Prefs, true); |
VorLFound = true; |
vg.Vname = pg.attribute("NAME"); |
vg.LineSpa = QStodouble(pg.attribute("LINESP")); |
vg.Indent = QStodouble(pg.attribute("INDENT","0")); |
vg.First = QStodouble(pg.attribute("FIRST","0")); |
vg.Ausri = QStoInt(pg.attribute("ALIGN")); |
vg.Avor = QStodouble(pg.attribute("VOR","0")); |
vg.Anach = QStodouble(pg.attribute("NACH","0")); |
if (pg.hasAttribute("FONT")) |
vg.Font = DoFonts[pg.attribute("FONT")]; |
else |
vg.Font = doc->Dfont; |
if (vg.Font == "") |
vg.Font = doc->Dfont; |
vg.FontSize = qRound(QStodouble(pg.attribute("FONTSIZE","12")) * 10); |
vg.Drop = static_cast<bool>(QStoInt(pg.attribute("DROP","0"))); |
vg.DropLin = QStoInt(pg.attribute("DROPLIN","2")); |
vg.FontEffect = QStoInt(pg.attribute("EFFECT","0")); |
vg.FColor = pg.attribute("FCOLOR", doc->Dbrush); |
vg.FShade = QStoInt(pg.attribute("FSHADE", "100")); |
vg.SColor = pg.attribute("SCOLOR", doc->Dpen); |
vg.SShade = QStoInt(pg.attribute("SSHADE", "100")); |
vg.BaseAdj = static_cast<bool>(QStoInt(pg.attribute("BASE","0"))); |
if ((pg.hasAttribute("NUMTAB")) && (QStoInt(pg.attribute("NUMTAB","0")) != 0)) |
{ |
tmp = pg.attribute("TABS"); |
QTextStream tgv(&tmp, IO_ReadOnly); |
vg.TabValues.clear(); |
for (int cxv = 0; cxv < QStoInt(pg.attribute("NUMTAB","0")); ++cxv) |
{ |
tgv >> xf; |
vg.TabValues.append(xf); |
} |
tmp = ""; |
} |
else |
vg.TabValues.clear(); |
for (uint xx=0; xx<doc->Vorlagen.count(); ++xx) |
{ |
if (vg.Vname == doc->Vorlagen[xx].Vname) |
{ |
if ((vg.LineSpa == doc->Vorlagen[xx].LineSpa) && |
(vg.Indent == doc->Vorlagen[xx].Indent) && |
(vg.First == doc->Vorlagen[xx].First) && |
(vg.Ausri == doc->Vorlagen[xx].Ausri) && |
(vg.Avor == doc->Vorlagen[xx].Avor) && |
(vg.Anach == doc->Vorlagen[xx].Anach) && |
(vg.Font == doc->Vorlagen[xx].Font) && |
(vg.TabValues == doc->Vorlagen[xx].TabValues) && |
(vg.Drop == doc->Vorlagen[xx].Drop) && |
(vg.DropLin == doc->Vorlagen[xx].DropLin) && |
(vg.FontEffect == doc->Vorlagen[xx].FontEffect) && |
(vg.FColor == doc->Vorlagen[xx].FColor) && |
(vg.FShade == doc->Vorlagen[xx].FShade) && |
(vg.SColor == doc->Vorlagen[xx].SColor) && |
(vg.SShade == doc->Vorlagen[xx].SShade) && |
(vg.BaseAdj == doc->Vorlagen[xx].BaseAdj) && |
(vg.FontSize == doc->Vorlagen[xx].FontSize)) |
{ |
DoVorl[VorlC] = tmV.setNum(xx); |
VorlC++; |
fou = true; |
} |
else |
{ |
vg.Vname = "Copy of "+doc->Vorlagen[xx].Vname; |
fou = false; |
} |
break; |
} |
} |
if (!fou) |
{ |
for (uint xx=0; xx<doc->Vorlagen.count(); ++xx) |
{ |
if ((vg.LineSpa == doc->Vorlagen[xx].LineSpa) && |
(vg.Indent == doc->Vorlagen[xx].Indent) && |
(vg.First == doc->Vorlagen[xx].First) && |
(vg.Ausri == doc->Vorlagen[xx].Ausri) && |
(vg.Avor == doc->Vorlagen[xx].Avor) && |
(vg.Anach == doc->Vorlagen[xx].Anach) && |
(vg.Font == doc->Vorlagen[xx].Font) && |
(vg.TabValues == doc->Vorlagen[xx].TabValues) && |
(vg.Drop == doc->Vorlagen[xx].Drop) && |
(vg.DropLin == doc->Vorlagen[xx].DropLin) && |
(vg.FontEffect == doc->Vorlagen[xx].FontEffect) && |
(vg.FColor == doc->Vorlagen[xx].FColor) && |
(vg.FShade == doc->Vorlagen[xx].FShade) && |
(vg.SColor == doc->Vorlagen[xx].SColor) && |
(vg.SShade == doc->Vorlagen[xx].SShade) && |
(vg.BaseAdj == doc->Vorlagen[xx].BaseAdj) && |
(vg.FontSize == doc->Vorlagen[xx].FontSize)) |
{ |
vg.Vname = doc->Vorlagen[xx].Vname; |
DoVorl[VorlC] = tmV.setNum(xx); |
VorlC++; |
fou = true; |
break; |
} |
} |
} |
if (!fou) |
{ |
doc->Vorlagen.append(vg); |
DoVorl[VorlC] = tmV.setNum(doc->Vorlagen.count()-1); |
VorlC++; |
} |
} |
DOC=DOC.nextSibling(); |
} |
2172,124 → 1831,14 |
QDomElement pg=DOC.toElement(); |
if(pg.tagName()=="ITEM") |
{ |
OB.PType = QStoInt(pg.attribute("PTYPE")); |
OB.Xpos = static_cast<double>(Xp) + QStodouble(pg.attribute("XPOS")) - GrX; |
OB.Ypos = static_cast<double>(Yp) + QStodouble(pg.attribute("YPOS")) - GrY; |
OB.Width = QStodouble(pg.attribute("WIDTH")); |
OB.Height = QStodouble(pg.attribute("HEIGHT")); |
OB.RadRect = QStodouble(pg.attribute("RADRECT","0")); |
OB.ClipEdited = QStoInt(pg.attribute("CLIPEDIT", "0")); |
OB.FrameType = QStoInt(pg.attribute("FRTYPE", "0")); |
OB.Pwidth = QStodouble(pg.attribute("PWIDTH")); |
OB.Pcolor = pg.attribute("PCOLOR"); |
if ((!newVersion) && (OB.PType == 4)) |
{ |
OB.TxtFill = pg.attribute("PCOLOR2"); |
OB.Pcolor2 = "None"; |
} |
else |
{ |
OB.Pcolor2 = pg.attribute("PCOLOR2"); |
OB.TxtFill = pg.attribute("TXTFILL", "Black"); |
} |
GetItemProps(newVersion, &pg, &OB); |
OB.NamedLStyle = pg.attribute("NAMEDLST", ""); |
if (!doc->MLineStyles.contains(OB.NamedLStyle)) |
OB.NamedLStyle = ""; |
OB.Shade = QStoInt(pg.attribute("SHADE")); |
OB.Shade2 = QStoInt(pg.attribute("SHADE2")); |
OB.TxtStroke = pg.attribute("TXTSTROKE", "None"); |
OB.ShTxtFill = QStoInt(pg.attribute("TXTFILLSH", "100")); |
OB.ShTxtStroke = QStoInt(pg.attribute("TXTSTRSH", "100")); |
OB.TxtScale = QStoInt(pg.attribute("TXTSCALE", "100")); |
OB.TxTStyle = QStoInt(pg.attribute("TXTSTYLE", "0")); |
OB.Cols = QStoInt(pg.attribute("COLUMNS","1")); |
OB.ColGap = QStodouble(pg.attribute("COLGAP","0.0")); |
OB.GrType = QStoInt(pg.attribute("GRTYP","0")); |
OB.fill_gradient.clearStops(); |
if (OB.GrType != 0) |
{ |
OB.GrStartX = QStodouble(pg.attribute("GRSTARTX","0.0")); |
OB.GrStartY = QStodouble(pg.attribute("GRSTARTY","0.0")); |
OB.GrEndX = QStodouble(pg.attribute("GRENDX","0.0")); |
OB.GrEndY = QStodouble(pg.attribute("GRENDY","0.0")); |
OB.GrColor = pg.attribute("GRCOLOR",""); |
if (OB.GrColor != "") |
{ |
OB.GrColor2 = pg.attribute("GRCOLOR2",""); |
OB.GrShade = QStoInt(pg.attribute("GRSHADE","100")); |
OB.GrShade2 = QStoInt(pg.attribute("GRSHADE2","100")); |
} |
} |
OB.Rot = QStodouble(pg.attribute("ROT")); |
OB.PLineArt = Qt::PenStyle(QStoInt(pg.attribute("PLINEART"))); |
OB.PLineEnd = Qt::PenCapStyle(QStoInt(pg.attribute("PLINEEND","0"))); |
OB.PLineJoin = Qt::PenJoinStyle(QStoInt(pg.attribute("PLINEJOIN","0"))); |
OB.LineSp = QStodouble(pg.attribute("LINESP")); |
OB.ExtraV = QStodouble(pg.attribute("EXTRAV","0")); |
OB.LocalScX = QStodouble(pg.attribute("LOCALSCX")); |
OB.LocalScY = QStodouble(pg.attribute("LOCALSCY")); |
OB.LocalX = QStodouble(pg.attribute("LOCALX")); |
OB.LocalY = QStodouble(pg.attribute("LOCALY")); |
OB.PicArt = QStoInt(pg.attribute("PICART")); |
OB.flippedH = QStoInt(pg.attribute("FLIPPEDH")); |
OB.flippedV = QStoInt(pg.attribute("FLIPPEDV")); |
OB.ScaleType = QStoInt(pg.attribute("SCALETYPE","1")); |
OB.AspectRatio = QStoInt(pg.attribute("RATIO","0")); |
OB.BBoxX = QStodouble(pg.attribute("BBOXX")); |
OB.BBoxH = QStodouble(pg.attribute("BBOXH")); |
OB.isPrintable = QStoInt(pg.attribute("PRINTABLE")); |
OB.isBookmark = false; |
OB.BMnr = 0; |
OB.isAnnotation = QStoInt(pg.attribute("ANNOTATION","0")); |
OB.AnType = QStoInt(pg.attribute("ANTYPE","0")); |
OB.AnAction = pg.attribute("ANACTION",""); |
OB.An_E_act = pg.attribute("ANEACT",""); |
OB.An_X_act = pg.attribute("ANXACT",""); |
OB.An_D_act = pg.attribute("ANDACT",""); |
OB.An_Fo_act = pg.attribute("ANFOACT",""); |
OB.An_Bl_act = pg.attribute("ANBLACT",""); |
OB.An_K_act = pg.attribute("ANKACT",""); |
OB.An_F_act = pg.attribute("ANFACT",""); |
OB.An_V_act = pg.attribute("ANVACT",""); |
OB.An_C_act = pg.attribute("ANCACT",""); |
OB.AnActType = QStoInt(pg.attribute("ANACTYP","0")); |
OB.An_Extern = pg.attribute("ANEXTERN",""); |
if ((OB.An_Extern != "") && (OB.AnActType != 8)) |
{ |
QFileInfo efp(OB.An_Extern); |
OB.An_Extern = efp.absFilePath(); |
} |
OB.AnZiel = QStoInt(pg.attribute("ANZIEL","0")); |
OB.AnName = pg.attribute("ANNAME",""); |
OB.AnToolTip = pg.attribute("ANTOOLTIP",""); |
OB.AnRollOver = pg.attribute("ANROLL",""); |
OB.AnDown = pg.attribute("ANDOWN",""); |
OB.AnBwid = QStoInt(pg.attribute("ANBWID","1")); |
OB.AnBsty = QStoInt(pg.attribute("ANBSTY","0")); |
OB.AnFeed = QStoInt(pg.attribute("ANFEED","1")); |
OB.AnFlag = QStoInt(pg.attribute("ANFLAG","0")); |
OB.AnFont = QStoInt(pg.attribute("ANFONT","4")); |
OB.AnFormat = QStoInt(pg.attribute("ANFORMAT","0")); |
OB.AnVis = QStoInt(pg.attribute("ANVIS","0")); |
OB.AnMaxChar = QStoInt(pg.attribute("ANMC","-1")); |
OB.AnIsChk = static_cast<bool>(QStoInt(pg.attribute("ANCHK","0"))); |
OB.AnAAact = static_cast<bool>(QStoInt(pg.attribute("ANAA","0"))); |
OB.AnHTML = static_cast<bool>(QStoInt(pg.attribute("ANHTML","0"))); |
OB.AnUseIcons = static_cast<bool>(QStoInt(pg.attribute("ANICON","0"))); |
OB.AnChkStil = QStoInt(pg.attribute("ANCHKS","0")); |
OB.AnIPlace = QStoInt(pg.attribute("ANPLACE","1")); |
OB.AnScaleW = QStoInt(pg.attribute("ANSCALE","0")); |
OB.AnBColor = pg.attribute("ANBCOL","None"); |
if (QStoInt(pg.attribute("TRANSPARENT","0")) == 1) |
OB.Pcolor = "None"; |
OB.Textflow = QStoInt(pg.attribute("TEXTFLOW")); |
OB.Textflow2 = QStoInt(pg.attribute("TEXTFLOW2","0")); |
OB.Extra = QStodouble(pg.attribute("EXTRA")); |
OB.TExtra = QStodouble(pg.attribute("TEXTRA", "1")); |
OB.BExtra = QStodouble(pg.attribute("BEXTRA", "1")); |
OB.RExtra = QStodouble(pg.attribute("REXTRA", "1")); |
OB.PoShow = QStoInt(pg.attribute("PTLSHOW","0")); |
OB.BaseOffs = QStodouble(pg.attribute("BASEOF","0")); |
OB.Ausrich = DoVorl[QStoInt(pg.attribute("ALIGN","0"))].toUInt(); |
tmf = pg.attribute("IFONT", doc->Dfont); |
if (tmf == "") |
2298,61 → 1847,8 |
OB.IFont = doc->Dfont; |
else |
OB.IFont = DoFonts[tmf]; |
OB.ISize = qRound(QStodouble(pg.attribute("ISIZE","12")) * 10); |
OB.Pfile = pg.attribute("PFILE"); |
OB.Pfile2 = pg.attribute("PFILE2",""); |
OB.Pfile3 = pg.attribute("PFILE3",""); |
OB.IProfile = pg.attribute("PRFILE",""); |
OB.EmProfile = pg.attribute("EPROF",""); |
OB.IRender = QStoInt(pg.attribute("IRENDER","1")); |
OB.UseEmbedded = QStoInt(pg.attribute("EMBEDDED","1")); |
OB.Locked = static_cast<bool>(QStoInt(pg.attribute("LOCK","0"))); |
OB.LockRes = static_cast<bool>(QStoInt(pg.attribute("LOCKR","0"))); |
OB.Reverse = static_cast<bool>(QStoInt(pg.attribute("REVERS","0"))); |
OB.InvPict = static_cast<bool>(QStoInt(pg.attribute("INVERS","0"))); |
OB.isTableItem = static_cast<bool>(QStoInt(pg.attribute("isTableItem","0"))); |
OB.TopLine = static_cast<bool>(QStoInt(pg.attribute("TopLine","0"))); |
OB.LeftLine = static_cast<bool>(QStoInt(pg.attribute("LeftLine","0"))); |
OB.RightLine = static_cast<bool>(QStoInt(pg.attribute("RightLine","0"))); |
OB.BottomLine = static_cast<bool>(QStoInt(pg.attribute("BottomLine","0"))); |
OB.TopLinkID = QStoInt(pg.attribute("TopLINK","-1")); |
OB.LeftLinkID = QStoInt(pg.attribute("LeftLINK","-1")); |
OB.RightLinkID = QStoInt(pg.attribute("RightLINK","-1")); |
OB.BottomLinkID = QStoInt(pg.attribute("BottomLINK","-1")); |
OB.LayerNr = 0; |
OB.Language = pg.attribute("LANGUAGE", doc->Language); |
OB.Transparency = QStodouble(pg.attribute("TransValue","0.0")); |
if (pg.hasAttribute("TransValueS")) |
OB.TranspStroke = QStodouble(pg.attribute("TransValueS","0.0")); |
else |
OB.TranspStroke = OB.Transparency; |
if (pg.hasAttribute("NUMCLIP")) |
{ |
OB.Clip.resize(pg.attribute("NUMCLIP").toUInt()); |
tmp = pg.attribute("CLIPCOOR"); |
QTextStream f(&tmp, IO_ReadOnly); |
for (uint c=0; c<pg.attribute("NUMCLIP").toUInt(); ++c) |
{ |
f >> x; |
f >> y; |
OB.Clip.setPoint(c, x, y); |
} |
} |
else |
OB.Clip.resize(0); |
if (pg.hasAttribute("NUMPO")) |
{ |
OB.PoLine.resize(pg.attribute("NUMPO").toUInt()); |
tmp = pg.attribute("POCOOR"); |
QTextStream fp(&tmp, IO_ReadOnly); |
for (uint cx=0; cx<pg.attribute("NUMPO").toUInt(); ++cx) |
{ |
fp >> xf; |
fp >> yf; |
OB.PoLine.setPoint(cx, xf, yf); |
} |
} |
else |
OB.PoLine.resize(0); |
tmp = ""; |
if ((pg.hasAttribute("GROUPS")) && (QStoInt(pg.attribute("NUMGROUP","0")) != 0)) |
{ |
2370,35 → 1866,6 |
else |
OB.Groups.clear(); |
tmp = ""; |
if ((pg.hasAttribute("NUMTAB")) && (QStoInt(pg.attribute("NUMTAB","0")) != 0)) |
{ |
tmp = pg.attribute("TABS"); |
QTextStream tgv(&tmp, IO_ReadOnly); |
OB.TabValues.clear(); |
for (int cxv = 0; cxv < QStoInt(pg.attribute("NUMTAB","0")); ++cxv) |
{ |
tgv >> xf; |
OB.TabValues.append(xf); |
} |
tmp = ""; |
} |
else |
OB.TabValues.clear(); |
if ((pg.hasAttribute("NUMDASH")) && (QStoInt(pg.attribute("NUMDASH","0")) != 0)) |
{ |
tmp = pg.attribute("DASHS"); |
QTextStream dgv(&tmp, IO_ReadOnly); |
OB.DashValues.clear(); |
for (int cxv = 0; cxv < QStoInt(pg.attribute("NUMDASH","0")); ++cxv) |
{ |
dgv >> xf; |
OB.DashValues.append(xf); |
} |
tmp = ""; |
} |
else |
OB.DashValues.clear(); |
OB.DashOffset = QStodouble(pg.attribute("DASHOFF","0.0")); |
QDomNode IT=DOC.firstChild(); |
while(!IT.isNull()) |
{ |
2412,38 → 1879,7 |
OB.fill_gradient.addStop(SetFarbe(doc, name, shade), ramp, 0.5, opa, name, shade); |
} |
if (it.tagName()=="ITEXT") |
{ |
tmp2 = it.attribute("CH"); |
tmp2.replace(QRegExp("\r"), QChar(5)); |
tmp2.replace(QRegExp("\n"), QChar(5)); |
tmp2.replace(QRegExp("\t"), QChar(4)); |
tmf = it.attribute("CFONT", doc->Dfont); |
if (tmf == "") |
tmf = doc->Dfont; |
if (DoFonts[tmf] == "") |
tmp3 = "\t" + doc->Dfont + "\t"; |
else |
tmp3 = "\t" + DoFonts[tmf] + "\t"; |
tmp3 += it.attribute("CSIZE") + "\t"; |
tmp3 += it.attribute("CCOLOR") + "\t"; |
tmp3 += it.attribute("CEXTRA") + "\t"; |
tmp3 += it.attribute("CSHADE") + "\t"; |
tmp3 += it.attribute("CSTYLE") + "\t"; |
if (VorLFound) |
tmp3 += DoVorl[it.attribute("CAB","0").toUInt()] + "\t"; |
else |
{ |
if (it.attribute("CAB","0").toUInt() < 5) |
tmp3 += it.attribute("CAB","0")+"\t"; |
else |
tmp3 += "0\t"; |
} |
tmp3 += it.attribute("CSTROKE","None") + "\t"; |
tmp3 += it.attribute("CSHADE2","100") + "\t"; |
tmp3 += it.attribute("CSCALE","100") + "\n"; |
for (uint cxx=0; cxx<tmp2.length(); ++cxx) |
tmp += tmp2.at(cxx)+tmp3; |
} |
tmp += GetItemText(&it, doc, Prefs, VorLFound, true); |
IT=IT.nextSibling(); |
} |
OB.Ptext = tmp; |
2498,7 → 1934,7 |
{ |
int tsh, tsh2, tst, tst2, tsb, tsb2, tshs, tshs2, tsc, tsc2; |
QString text, tf, tf2, tc, tc2, tcs, tcs2, tmp, tmpy; |
double te, te2, xf, yf, ts, ts2; |
double te, te2, ts, ts2; |
PageItem *item; |
QDomDocument docu("scribus"); |
QString st="<SCRIBUSELEMUTF8></SCRIBUSELEMUTF8>"; |
2680,28 → 2116,7 |
QDir::setCurrent(QDir::homeDirPath()); |
item = doc->ActPage->Items.at(ELL[co]); |
QDomElement ob=docu.createElement("ITEM"); |
ob.setAttribute("PTYPE",item->PType); |
ob.setAttribute("XPOS",item->Xpos); |
ob.setAttribute("YPOS",item->Ypos); |
ob.setAttribute("WIDTH",item->Width); |
ob.setAttribute("HEIGHT",item->Height); |
ob.setAttribute("RADRECT",item->RadRect); |
ob.setAttribute("FRTYPE", item->FrameType); |
ob.setAttribute("CLIPEDIT", item->ClipEdited ? 1 : 0); |
ob.setAttribute("PWIDTH",item->Pwidth); |
ob.setAttribute("PCOLOR",item->Pcolor); |
ob.setAttribute("PCOLOR2",item->Pcolor2); |
ob.setAttribute("TXTFILL",item->TxtFill); |
ob.setAttribute("TXTSTROKE",item->TxtStroke); |
ob.setAttribute("TXTSTRSH",item->ShTxtStroke); |
ob.setAttribute("TXTFILLSH",item->ShTxtFill); |
ob.setAttribute("TXTSCALE",item->TxtScale); |
ob.setAttribute("TXTSTYLE",item->TxTStyle); |
ob.setAttribute("COLUMNS", item->Cols); |
ob.setAttribute("COLGAP", item->ColGap); |
ob.setAttribute("NAMEDLST",item->NamedLStyle); |
ob.setAttribute("SHADE",item->Shade); |
ob.setAttribute("SHADE2",item->Shade2); |
SetItemProps(&ob, item); |
if (item->GrType != 0) |
{ |
QPtrVector<VColorStop> cstops = item->fill_gradient.colorStops(); |
2719,131 → 2134,7 |
ob.setAttribute("GRENDX", item->GrEndX); |
ob.setAttribute("GRENDY", item->GrEndY); |
} |
ob.setAttribute("GRTYP",item->GrType); |
ob.setAttribute("ROT",item->Rot); |
ob.setAttribute("PLINEART",item->PLineArt); |
ob.setAttribute("PLINEEND", item->PLineEnd); |
ob.setAttribute("PLINEJOIN", item->PLineJoin); |
ob.setAttribute("LINESP",item->LineSp); |
ob.setAttribute("EXTRAV",item->ExtraV); |
ob.setAttribute("LOCALSCX",item->LocalScX); |
ob.setAttribute("LOCALSCY",item->LocalScY); |
ob.setAttribute("LOCALX",item->LocalX); |
ob.setAttribute("LOCALY",item->LocalY); |
ob.setAttribute("PICART", item->PicArt ? 1 : 0); |
ob.setAttribute("PTLSHOW", item->PoShow ? 1 : 0); |
ob.setAttribute("BASEOF", item->BaseOffs); |
ob.setAttribute("FLIPPEDH",item->flippedH); |
ob.setAttribute("FLIPPEDV",item->flippedV); |
ob.setAttribute("BBOXX",item->BBoxX); |
ob.setAttribute("BBOXH",item->BBoxH); |
ob.setAttribute("SCALETYPE", item->ScaleType ? 1 : 0); |
ob.setAttribute("RATIO", item->AspectRatio ? 1 : 0); |
ob.setAttribute("PRINTABLE", item->isPrintable ? 1 : 0); |
if(item->isAnnotation) |
{ |
ob.setAttribute("ANNOTATION",1); |
ob.setAttribute("ANTYPE", item->AnType); |
ob.setAttribute("ANACTION", item->AnAction); |
ob.setAttribute("ANEACT", item->An_E_act); |
ob.setAttribute("ANXACT", item->An_X_act); |
ob.setAttribute("ANDACT", item->An_D_act); |
ob.setAttribute("ANFOACT", item->An_Fo_act); |
ob.setAttribute("ANBLACT", item->An_Bl_act); |
ob.setAttribute("ANKACT", item->An_K_act); |
ob.setAttribute("ANFACT", item->An_F_act); |
ob.setAttribute("ANVACT", item->An_V_act); |
ob.setAttribute("ANCACT", item->An_C_act); |
if (item->AnActType == 8) |
ob.setAttribute("ANEXTERN", item->An_Extern); |
else |
ob.setAttribute("ANEXTERN", Path2Relative(item->An_Extern)); |
ob.setAttribute("ANZIEL", item->AnZiel); |
ob.setAttribute("ANACTYP", item->AnActType); |
ob.setAttribute("ANTOOLTIP", item->AnToolTip); |
ob.setAttribute("ANBWID", item->AnBwid); |
ob.setAttribute("ANBSTY", item->AnBsty); |
ob.setAttribute("ANFEED", item->AnFeed); |
ob.setAttribute("ANFLAG", item->AnFlag); |
ob.setAttribute("ANFONT", item->AnFont); |
ob.setAttribute("ANFORMAT", item->AnFormat); |
ob.setAttribute("ANROLL", item->AnRollOver); |
ob.setAttribute("ANDOWN", item->AnDown); |
ob.setAttribute("ANVIS", item->AnVis); |
ob.setAttribute("ANMC", item->AnMaxChar); |
ob.setAttribute("ANCHK", item->AnIsChk); |
ob.setAttribute("ANAA", item->AnAAact); |
ob.setAttribute("ANCHKS", item->AnChkStil); |
ob.setAttribute("ANBCOL", item->AnBColor); |
ob.setAttribute("ANHTML", item->AnHTML); |
ob.setAttribute("ANICON", item->AnUseIcons); |
ob.setAttribute("ANPLACE", item->AnIPlace); |
ob.setAttribute("ANSCALE", item->AnScaleW); |
} |
else |
ob.setAttribute("ANNOTATION",0); |
ob.setAttribute("ANNAME", !item->AutoName ? item->AnName : QString("")); |
ob.setAttribute("TEXTFLOW", item->Textflow ? 1 : 0); |
ob.setAttribute("TEXTFLOW2", item->Textflow2 ? 1 : 0); |
ob.setAttribute("AUTOTEXT", item->isAutoText ? 1 : 0); |
ob.setAttribute("EXTRA",item->Extra); |
ob.setAttribute("TEXTRA",item->TExtra); |
ob.setAttribute("BEXTRA",item->BExtra); |
ob.setAttribute("REXTRA",item->RExtra); |
if (item->Ausrich > 4) |
ob.setAttribute("ALIGN",UsedMapped2Saved[item->Ausrich]); |
else |
ob.setAttribute("ALIGN",item->Ausrich); |
ob.setAttribute("IFONT",item->IFont); |
ob.setAttribute("ISIZE",item->ISize / 10.0); |
if (item->Pfile != "") |
ob.setAttribute("PFILE",Path2Relative(item->Pfile)); |
else |
ob.setAttribute("PFILE",""); |
if (item->Pfile2 != "") |
ob.setAttribute("PFILE2",Path2Relative(item->Pfile2)); |
else |
ob.setAttribute("PFILE2",""); |
if (item->Pfile3 != "") |
ob.setAttribute("PFILE3",Path2Relative(item->Pfile3)); |
else |
ob.setAttribute("PFILE3",""); |
QDir::setCurrent(CurDirP); |
ob.setAttribute("PRFILE",item->IProfile); |
ob.setAttribute("EPROF", item->EmProfile); |
ob.setAttribute("IRENDER",item->IRender); |
ob.setAttribute("EMBEDDED", item->UseEmbedded ? 1 : 0); |
ob.setAttribute("LOCK", item->Locked ? 1 : 0); |
ob.setAttribute("LOCKR", item->LockRes ? 1 : 0); |
ob.setAttribute("REVERS", item->Reverse ? 1 : 0); |
ob.setAttribute("INVERS", item->InvPict ? 1 : 0); |
ob.setAttribute("TransValue", item->Transparency); |
ob.setAttribute("TransValueS", item->TranspStroke); |
ob.setAttribute("isTableItem", static_cast<int>(item->isTableItem)); |
ob.setAttribute("TopLine", static_cast<int>(item->TopLine)); |
ob.setAttribute("LeftLine", static_cast<int>(item->LeftLine)); |
ob.setAttribute("RightLine", static_cast<int>(item->RightLine)); |
ob.setAttribute("BottomLine", static_cast<int>(item->BottomLine)); |
if (item->isTableItem) |
{ |
if (item->TopLink != 0) |
ob.setAttribute("TopLINK", item->TopLink->ItemNr); |
else |
ob.setAttribute("TopLINK", -1); |
if (item->LeftLink != 0) |
ob.setAttribute("LeftLINK", item->LeftLink->ItemNr); |
else |
ob.setAttribute("LeftLINK", -1); |
if (item->RightLink != 0) |
ob.setAttribute("RightLINK", item->RightLink->ItemNr); |
else |
ob.setAttribute("RightLINK", -1); |
if (item->BottomLink != 0) |
ob.setAttribute("BottomLINK", item->BottomLink->ItemNr); |
else |
ob.setAttribute("BottomLINK", -1); |
ob.setAttribute("OwnLINK", item->ItemNr); |
} |
for(uint k=0;k<item->Ptext.count();++k) |
{ |
QDomElement it=docu.createElement("ITEXT"); |
2949,38 → 2240,10 |
for(uint kt=0;kt<item->Ptext.count();++kt) |
txnu += tmp.setNum(item->Ptext.at(kt)->xp) + " " + tmpy.setNum(item->Ptext.at(kt)->yp) + " "; |
ob.setAttribute("TEXTCOOR", txnu); |
ob.setAttribute("NUMGROUP",static_cast<int>(item->Groups.count())); |
QString glp = ""; |
QValueStack<int>::Iterator nx; |
for (nx = item->Groups.begin(); nx != item->Groups.end(); ++nx) |
glp += tmp.setNum((*nx)) + " "; |
ob.setAttribute("GROUPS", glp); |
ob.setAttribute("NUMTAB", static_cast<int>(item->TabValues.count())); |
QString tlp = ""; |
QValueList<double>::Iterator tax; |
for (tax = item->TabValues.begin(); tax != item->TabValues.end(); ++tax) |
tlp += tmp.setNum((*tax)) + " "; |
ob.setAttribute("TABS", tlp); |
ob.setAttribute("NUMDASH", static_cast<int>(item->DashValues.count())); |
QString dlp = ""; |
QValueList<double>::Iterator dax; |
for (dax = item->DashValues.begin(); dax != item->DashValues.end(); ++dax) |
dlp += tmp.setNum((*dax)) + " "; |
ob.setAttribute("DASHS", dlp); |
ob.setAttribute("DASHOFF", item->DashOffset); |
ob.setAttribute("NUMPO",item->PoLine.size()); |
QString polp = ""; |
for (uint nxx=0; nxx<item->PoLine.size(); ++nxx) |
{ |
item->PoLine.point(nxx, &xf, &yf); |
polp += tmp.setNum(xf) + " " + tmpy.setNum(yf) + " "; |
} |
ob.setAttribute("POCOOR", polp); |
ob.setAttribute("BACKITEM", -1); |
ob.setAttribute("BACKPAGE", -1); |
ob.setAttribute("NEXTITEM", -1); |
ob.setAttribute("NEXTPAGE", -1); |
ob.setAttribute("LANGUAGE", item->Language); |
elem.appendChild(ob); |
} |
return docu.toString().utf8(); |
2990,7 → 2253,7 |
{ |
int tsh, tsh2, tst, tst2, tsb, tsb2, tshs, tshs2, tsc, tsc2; |
QString text, tf, tf2, tc, tc2, tcs, tcs2, tmp, tmpy, Ndir; |
double ts, ts2, te, te2, xf, yf; |
double ts, ts2, te, te2; |
uint ObCount = maxC; |
Page *page; |
PageItem *item; |
3019,28 → 2282,7 |
{ |
item = page->Items.at(j); |
QDomElement ob=docu.createElement("PAGEOBJECT"); |
ob.setAttribute("PTYPE",item->PType); |
ob.setAttribute("XPOS",item->Xpos); |
ob.setAttribute("YPOS",item->Ypos); |
ob.setAttribute("WIDTH",item->Width); |
ob.setAttribute("HEIGHT",item->Height); |
ob.setAttribute("RADRECT",item->RadRect); |
ob.setAttribute("FRTYPE", item->FrameType); |
ob.setAttribute("CLIPEDIT", item->ClipEdited ? 1 : 0); |
ob.setAttribute("PWIDTH",item->Pwidth); |
ob.setAttribute("PCOLOR",item->Pcolor); |
ob.setAttribute("PCOLOR2",item->Pcolor2); |
ob.setAttribute("TXTFILL",item->TxtFill); |
ob.setAttribute("TXTSTROKE",item->TxtStroke); |
ob.setAttribute("TXTSTRSH",item->ShTxtStroke); |
ob.setAttribute("TXTFILLSH",item->ShTxtFill); |
ob.setAttribute("TXTSCALE",item->TxtScale); |
ob.setAttribute("TXTSTYLE",item->TxTStyle); |
ob.setAttribute("COLUMNS", item->Cols); |
ob.setAttribute("COLGAP", item->ColGap); |
ob.setAttribute("NAMEDLST",item->NamedLStyle); |
ob.setAttribute("SHADE",item->Shade); |
ob.setAttribute("SHADE2",item->Shade2); |
SetItemProps(&ob, item); |
if (item->GrType != 0) |
{ |
QPtrVector<VColorStop> cstops = item->fill_gradient.colorStops(); |
3058,129 → 2300,9 |
ob.setAttribute("GRENDX", item->GrEndX); |
ob.setAttribute("GRENDY", item->GrEndY); |
} |
ob.setAttribute("GRTYP",item->GrType); |
ob.setAttribute("ROT",item->Rot); |
ob.setAttribute("PLINEART",item->PLineArt); |
ob.setAttribute("PLINEEND", item->PLineEnd); |
ob.setAttribute("PLINEJOIN", item->PLineJoin); |
ob.setAttribute("LINESP",item->LineSp); |
ob.setAttribute("EXTRAV",item->ExtraV); |
ob.setAttribute("LOCALSCX",item->LocalScX); |
ob.setAttribute("LOCALSCY",item->LocalScY); |
ob.setAttribute("LOCALX",item->LocalX); |
ob.setAttribute("LOCALY",item->LocalY); |
ob.setAttribute("PICART", item->PicArt ? 1 : 0); |
ob.setAttribute("PLTSHOW", item->PoShow ? 1 : 0); |
ob.setAttribute("BASEOF", item->BaseOffs); |
ob.setAttribute("FLIPPEDH",item->flippedH); |
ob.setAttribute("FLIPPEDV",item->flippedV); |
ob.setAttribute("BBOXX",item->BBoxX); |
ob.setAttribute("BBOXH",item->BBoxH); |
ob.setAttribute("ALIGN",item->Ausrich); |
ob.setAttribute("IFONT",item->IFont); |
ob.setAttribute("ISIZE",item->ISize / 10.0 ); |
ob.setAttribute("SCALETYPE", item->ScaleType ? 1 : 0); |
ob.setAttribute("RATIO", item->AspectRatio ? 1 : 0); |
ob.setAttribute("PRINTABLE", item->isPrintable ? 1 : 0); |
ob.setAttribute("BOOKMARK", item->isBookmark ? 1 : 0); |
ob.setAttribute("BookNr", item->BMnr); |
if(item->isAnnotation) |
{ |
ob.setAttribute("ANNOTATION",1); |
ob.setAttribute("ANTYPE", item->AnType); |
ob.setAttribute("ANACTION", item->AnAction); |
ob.setAttribute("ANEACT", item->An_E_act); |
ob.setAttribute("ANXACT", item->An_X_act); |
ob.setAttribute("ANDACT", item->An_D_act); |
ob.setAttribute("ANFOACT", item->An_Fo_act); |
ob.setAttribute("ANBLACT", item->An_Bl_act); |
ob.setAttribute("ANKACT", item->An_K_act); |
ob.setAttribute("ANFACT", item->An_F_act); |
ob.setAttribute("ANVACT", item->An_V_act); |
ob.setAttribute("ANCACT", item->An_C_act); |
if (item->AnActType == 8) |
ob.setAttribute("ANEXTERN", item->An_Extern); |
else |
ob.setAttribute("ANEXTERN", Path2Relative(item->An_Extern)); |
ob.setAttribute("ANZIEL", item->AnZiel); |
ob.setAttribute("ANACTYP", item->AnActType); |
ob.setAttribute("ANTOOLTIP", item->AnToolTip); |
ob.setAttribute("ANBWID", item->AnBwid); |
ob.setAttribute("ANBSTY", item->AnBsty); |
ob.setAttribute("ANFEED", item->AnFeed); |
ob.setAttribute("ANFLAG", item->AnFlag); |
ob.setAttribute("ANFONT", item->AnFont); |
ob.setAttribute("ANFORMAT", item->AnFormat); |
ob.setAttribute("ANROLL", item->AnRollOver); |
ob.setAttribute("ANDOWN", item->AnDown); |
ob.setAttribute("ANVIS", item->AnVis); |
ob.setAttribute("ANMC", item->AnMaxChar); |
ob.setAttribute("ANCHK", item->AnIsChk); |
ob.setAttribute("ANAA", item->AnAAact); |
ob.setAttribute("ANCHKS", item->AnChkStil); |
ob.setAttribute("ANBCOL", item->AnBColor); |
ob.setAttribute("ANHTML", item->AnHTML); |
ob.setAttribute("ANICON", item->AnUseIcons); |
ob.setAttribute("ANPLACE", item->AnIPlace); |
ob.setAttribute("ANSCALE", item->AnScaleW); |
} |
else |
ob.setAttribute("ANNOTATION",0); |
ob.setAttribute("ANNAME", !item->AutoName ? item->AnName : QString("")); |
ob.setAttribute("TEXTFLOW", item->Textflow ? 1 : 0); |
ob.setAttribute("TEXTFLOW2", item->Textflow2 ? 1 : 0); |
ob.setAttribute("AUTOTEXT", item->isAutoText ? 1 : 0); |
ob.setAttribute("EXTRA",item->Extra); |
ob.setAttribute("TEXTRA",item->TExtra); |
ob.setAttribute("BEXTRA",item->BExtra); |
ob.setAttribute("REXTRA",item->RExtra); |
if (((item->PType == 2) || (item->PType == 4)) && (item->Pfile != "")) |
ob.setAttribute("PFILE",Path2Relative(item->Pfile)); |
else |
ob.setAttribute("PFILE",""); |
if (item->Pfile2 != "") |
ob.setAttribute("PFILE2",Path2Relative(item->Pfile2)); |
else |
ob.setAttribute("PFILE2",""); |
if (item->Pfile3 != "") |
ob.setAttribute("PFILE3",Path2Relative(item->Pfile3)); |
else |
ob.setAttribute("PFILE3",""); |
ob.setAttribute("PRFILE",item->IProfile); |
ob.setAttribute("EPROF", item->EmProfile); |
ob.setAttribute("IRENDER",item->IRender); |
ob.setAttribute("EMBEDDED", item->UseEmbedded ? 1 : 0); |
ob.setAttribute("LOCK", item->Locked ? 1 : 0); |
ob.setAttribute("LOCKR", item->LockRes ? 1 : 0); |
ob.setAttribute("REVERS", item->Reverse ? 1 : 0); |
ob.setAttribute("INVERS", item->InvPict ? 1 : 0); |
ob.setAttribute("TransValue", item->Transparency); |
ob.setAttribute("TransValueS", item->TranspStroke); |
ob.setAttribute("isTableItem", static_cast<int>(item->isTableItem)); |
ob.setAttribute("TopLine", static_cast<int>(item->TopLine)); |
ob.setAttribute("LeftLine", static_cast<int>(item->LeftLine)); |
ob.setAttribute("RightLine", static_cast<int>(item->RightLine)); |
ob.setAttribute("BottomLine", static_cast<int>(item->BottomLine)); |
if (item->isTableItem) |
{ |
if (item->TopLink != 0) |
ob.setAttribute("TopLINK", item->TopLink->ItemNr); |
else |
ob.setAttribute("TopLINK", -1); |
if (item->LeftLink != 0) |
ob.setAttribute("LeftLINK", item->LeftLink->ItemNr); |
else |
ob.setAttribute("LeftLINK", -1); |
if (item->RightLink != 0) |
ob.setAttribute("RightLINK", item->RightLink->ItemNr); |
else |
ob.setAttribute("RightLINK", -1); |
if (item->BottomLink != 0) |
ob.setAttribute("BottomLINK", item->BottomLink->ItemNr); |
else |
ob.setAttribute("BottomLINK", -1); |
ob.setAttribute("OwnLINK", item->ItemNr); |
} |
for(uint k=0;k<item->Ptext.count();++k) |
{ |
QDomElement it=docu.createElement("ITEXT"); |
3272,33 → 2394,6 |
k--; |
ob.appendChild(it); |
} |
ob.setAttribute("NUMGROUP", static_cast<int>(item->Groups.count())); |
QString glp = ""; |
QValueStack<int>::Iterator nx; |
for (nx = item->Groups.begin(); nx != item->Groups.end(); ++nx) |
glp += tmp.setNum((*nx)) + " "; |
ob.setAttribute("GROUPS", glp); |
ob.setAttribute("NUMTAB", static_cast<int>(item->TabValues.count())); |
QString tlp = ""; |
QValueList<double>::Iterator tax; |
for (tax = item->TabValues.begin(); tax != item->TabValues.end(); ++tax) |
tlp += tmp.setNum((*tax)) + " "; |
ob.setAttribute("TABS", tlp); |
ob.setAttribute("NUMDASH", static_cast<int>(item->DashValues.count())); |
QString dlp = ""; |
QValueList<double>::Iterator dax; |
for (dax = item->DashValues.begin(); dax != item->DashValues.end(); ++dax) |
dlp += tmp.setNum((*dax)) + " "; |
ob.setAttribute("DASHS", dlp); |
ob.setAttribute("DASHOFF", item->DashOffset); |
ob.setAttribute("NUMPO",item->PoLine.size()); |
QString polp = ""; |
for (uint nxx=0; nxx<item->PoLine.size(); ++nxx) |
{ |
item->PoLine.point(nxx, &xf, &yf); |
polp += tmp.setNum(xf) + " " + tmpy.setNum(yf) + " "; |
} |
ob.setAttribute("POCOOR", polp); |
if (item->BackBox != 0) |
{ |
ob.setAttribute("BACKITEM", item->BackBox->ItemNr); |
3320,7 → 2415,6 |
ob.setAttribute("NEXTPAGE", -1); |
} |
ob.setAttribute("LAYER", item->LayerNr); |
ob.setAttribute("LANGUAGE", item->Language); |
pg.appendChild(ob); |
} |
dc.appendChild(pg); |
/trunk/Scribus/scribus/qm/scribus.pl.qm |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
/trunk/Scribus/scribus/qm/scribus.de.qm |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |