2115
2115
if (CurItem->asImageFrame())
2117
disconnect(imagePageNumber, SIGNAL(valueChanged(int)), this, SLOT(NewPage()));
2118
imagePageNumber->setMaximum(CurItem->pixm.imgInfo.numberOfPages);
2119
imagePageNumber->setValue(CurItem->pixm.imgInfo.actualPageNumber);
2120
connect(imagePageNumber, SIGNAL(valueChanged(int)), this, SLOT(NewPage()));
2117
if (CurItem->PictureIsAvailable)
2119
disconnect(imagePageNumber, SIGNAL(valueChanged(int)), this, SLOT(NewPage()));
2120
imagePageNumber->setMaximum(CurItem->pixm.imgInfo.numberOfPages);
2121
imagePageNumber->setValue(CurItem->pixm.imgInfo.actualPageNumber);
2122
connect(imagePageNumber, SIGNAL(valueChanged(int)), this, SLOT(NewPage()));
2123
imagePageNumber->setEnabled(true);
2127
imagePageNumber->setValue(CurItem->pixm.imgInfo.actualPageNumber);
2128
imagePageNumber->setEnabled(false);
2122
2131
Revert->setChecked(CurItem->reversed());
2123
2132
setTextFlowMode(CurItem->textFlowMode());
2947
2956
if ((HaveDoc) && (HaveItem))
2949
2958
if (CurItem->asTextFrame())
2951
// CurItem->asTextFrame()->ExpandParSel();
2952
2959
CurItem->itemTextSaxed = CurItem->getItemTextSaxed(doc->appMode == modeEdit? PageItem::PARAGRAPH : PageItem::FRAME);
2953
// CurItem->asTextFrame()->lastAction4Paragraph = true;
2955
2960
doc->itemSelection_SetLineSpacingMode(id);
2956
2961
updateStyle(doc->appMode == modeEdit? CurItem->currentStyle() : CurItem->itemText.defaultStyle());
2957
2962
if (CurItem->asTextFrame())
3874
3879
if (!HaveDoc || !HaveItem || !m_ScMW || m_ScMW->scriptIsRunning())
3876
3881
if (CurItem->asTextFrame())
3878
// CurItem->asTextFrame()->ExpandParSel();
3879
3882
CurItem->itemTextSaxed = CurItem->getItemTextSaxed(doc->appMode == modeEdit? PageItem::PARAGRAPH : PageItem::FRAME);
3880
// CurItem->asTextFrame()->lastAction4Paragraph = true;
3882
3883
doc->itemSelection_SetLineSpacing(LineSp->value());
3883
3884
if (CurItem->asTextFrame())
3884
3885
CurItem->asTextFrame()->updateUndo();
4277
4278
void PropertiesPalette::NewAlignement(int a)
4279
int selStart = 0, selEnd = 0, selLength = 0;
4280
4280
if (!HaveDoc || !HaveItem || !m_ScMW || m_ScMW->scriptIsRunning())
4282
4282
if (CurItem->asTextFrame())
4284
// hack for apply left align for text with no align at all
4285
//so during Undo/Redo some align will be applied
4286
StoryText& itemText(CurItem->itemText);
4287
if (doc->appMode == modeEdit)
4289
//selected parapgraph(s) only
4290
selStart = (itemText.lengthOfSelection() > 0) ? itemText.startOfSelection() : CurItem->CPos;
4291
selEnd = (itemText.lengthOfSelection() > 0) ? itemText.endOfSelection() : CurItem->CPos;
4292
selStart = itemText.startOfParagraph( itemText.nrOfParagraph(selStart) );
4293
selEnd = itemText.endOfParagraph ( itemText.nrOfParagraph(selEnd) );
4298
selStart = itemText.startOfParagraph( 0 );
4299
selEnd = itemText.endOfParagraph ( itemText.nrOfParagraph(itemText.lastInFrame()) );
4301
selLength = qMin(selEnd - selStart + 1, itemText.length() - selStart);
4302
CurItem->itemTextSaxed = CurItem->getItemTextSaxed(selStart, selLength);
4303
// CurItem->asTextFrame()->lastAction4Paragraph = true;
4283
CurItem->itemTextSaxed = CurItem->getItemTextSaxed(doc->appMode == modeEdit? PageItem::PARAGRAPH : PageItem::FRAME);
4305
4284
doc->itemSelection_SetAlignment(a);
4306
4285
if (CurItem->asTextFrame())
4307
4286
CurItem->asTextFrame()->updateUndo();
4728
4707
if (!HaveDoc || !HaveItem || !m_ScMW || m_ScMW->scriptIsRunning())
4730
bool setter=Revert->isChecked();
4731
CurItem->setImageFlippedH(setter);
4732
CurItem->setReversed(setter);
4709
doc->itemSelection_SetItemTextReversed(Revert->isChecked());
5638
5613
Locked->setToolTip( tr("Lock or unlock the object"));
5639
5614
NoResize->setToolTip( tr("Lock or unlock the size of the object"));
5640
5615
NoPrint->setToolTip( tr("Enable or disable exporting of the object"));
5616
EvenOdd->setToolTip( "<qt>" + tr("This rule determines the "insideness" of a point on the canvas by drawing a ray from that point to infinity in any direction and counting the number of path segments from the given shape that the ray crosses. If this number is odd, the point is inside, if even, the point is outside.") + "</qt>");
5617
NonZero->setToolTip( "<qt>" + tr("This rule determines the "insideness" of a point on the canvas by drawing a ray from that point to infinity in any direction and then examining the places where a segment of the shape crosses the ray. Starting with a count of zero, add one each time a path segment crosses the ray from left to right and subtract one each time a path segment crosses the ray from right to left. If the result is zero then the point is outside the path. Otherwise, it is inside.") + "</qt>");
5641
5618
/*textFlowOptions->setToolTip( tr("Make text in lower frames flow around the object shape")); */
5642
5619
textFlowDisabled->setToolTip( tr("Disable text flow from lower frames around object"));
5643
5620
textFlowUsesFrameShape->setToolTip( tr("Use the frame shape for text flow of text frames below the object."));
5795
5772
Height->setPalette(pal);
5796
5773
Rotation->setPalette(pal);
5798
EditShape->setEnabled(!isLocked);
5775
bool shapeEditLocked = isLocked;
5777
shapeEditLocked |= CurItem->sizeLocked();
5778
EditShape->setEnabled(!shapeEditLocked);
5799
5780
LayerGroup->setEnabled(!isLocked);
5800
5781
Locked->setChecked(isLocked);
5801
5782
if ((HaveDoc) && (HaveItem))
5823
5804
Width->setPalette(pal);
5824
5805
Height->setPalette(pal);
5825
5806
NoResize->setChecked(isSizeLocked);
5808
bool shapeEditLocked = isSizeLocked;
5810
shapeEditLocked |= CurItem->locked();
5811
EditShape->setEnabled(!shapeEditLocked);
5828
5814
void PropertiesPalette::setPrintingEnabled(bool isPrintingEnabled)