~ubuntu-branches/ubuntu/wily/scribus/wily-proposed

« back to all changes in this revision

Viewing changes to scribus/propertiespalette.cpp

  • Committer: Package Import Robot
  • Author(s): Oleksandr Moskalenko
  • Date: 2012-02-09 21:50:56 UTC
  • mfrom: (1.1.6)
  • Revision ID: package-import@ubuntu.com-20120209215056-2wrx1ara0jbm7fi5
Tags: 1.4.0.dfsg+r17287-1
* New upstream stable release upload into Debian (Closes: #654703).
* Applied the Ubuntu armel patch.
* Removed non-free color swatches from resources.
* debian/control:
  - Moved icc-profiles from Recommends to Suggests (Closes: #655885).
  - Updated Standards-Version to 3.9.2.
  - Updated extended description per lintian warning.
* debian/rules:
  - Update mailcap (Closes: #630751). A request for mime.types update has
    been sent to the mime-support maintainer.
  - Added build-arch and build-indep targets per lintian warning.
* debian/patches:
  - top_cmakelists.patch - don't copy extra docs and changelogs.
  - scribus_cmakelists.patch - don't copy extra docs and changelogs.
  - scribus_cmakelists.patch - don't install the non-free "doc" dir.
  - profiles_cmakelists.patch - don't install non-free sRGB profile.
* debian/copyright: 
  - Converted to the DEP5 machine readable foramt.
  - Added licenses for free color swatches.

Show diffs side-by-side

added added

removed removed

Lines of Context:
2114
2114
        }
2115
2115
        if (CurItem->asImageFrame())
2116
2116
        {
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)
 
2118
                {
 
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);
 
2124
                }
 
2125
                else
 
2126
                {
 
2127
                        imagePageNumber->setValue(CurItem->pixm.imgInfo.actualPageNumber);
 
2128
                        imagePageNumber->setEnabled(false);
 
2129
                }
2121
2130
        }
2122
2131
        Revert->setChecked(CurItem->reversed());
2123
2132
        setTextFlowMode(CurItem->textFlowMode());
2485
2494
                {
2486
2495
                        i=doc->m_Selection->itemAt(0);
2487
2496
                        HaveItem=true;
2488
 
                        EditShape->setEnabled(!i->locked());
 
2497
                        EditShape->setEnabled(!i->locked() && !i->sizeLocked());
2489
2498
                        SCustom->setEnabled(nr!=5 && nr!=7 && nr!=8 && !i->locked());
2490
2499
                }
2491
2500
                else
2947
2956
        if ((HaveDoc) && (HaveItem))
2948
2957
        {
2949
2958
                if (CurItem->asTextFrame())
2950
 
                {
2951
 
//                      CurItem->asTextFrame()->ExpandParSel();
2952
2959
                        CurItem->itemTextSaxed = CurItem->getItemTextSaxed(doc->appMode == modeEdit? PageItem::PARAGRAPH : PageItem::FRAME);
2953
 
//                      CurItem->asTextFrame()->lastAction4Paragraph = true;
2954
 
                }
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())
3875
3880
                return;
3876
3881
        if (CurItem->asTextFrame())
3877
 
        {
3878
 
//              CurItem->asTextFrame()->ExpandParSel();
3879
3882
                CurItem->itemTextSaxed = CurItem->getItemTextSaxed(doc->appMode == modeEdit? PageItem::PARAGRAPH : PageItem::FRAME);
3880
 
//              CurItem->asTextFrame()->lastAction4Paragraph = true;
3881
 
        }
3882
3883
        doc->itemSelection_SetLineSpacing(LineSp->value());
3883
3884
        if (CurItem->asTextFrame())
3884
3885
                CurItem->asTextFrame()->updateUndo();
4276
4277
 
4277
4278
void PropertiesPalette::NewAlignement(int a)
4278
4279
{
4279
 
        int selStart = 0, selEnd = 0, selLength = 0;
4280
4280
        if (!HaveDoc || !HaveItem || !m_ScMW || m_ScMW->scriptIsRunning())
4281
4281
                return;
4282
4282
        if (CurItem->asTextFrame())
4283
 
        {
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)
4288
 
                {
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) );
4294
 
                }
4295
 
                else
4296
 
                {
4297
 
                        //for whole frame
4298
 
                        selStart = itemText.startOfParagraph( 0 );
4299
 
                        selEnd   = itemText.endOfParagraph  ( itemText.nrOfParagraph(itemText.lastInFrame()) );
4300
 
                }
4301
 
                selLength = qMin(selEnd - selStart + 1, itemText.length() - selStart);
4302
 
                CurItem->itemTextSaxed = CurItem->getItemTextSaxed(selStart, selLength);
4303
 
//              CurItem->asTextFrame()->lastAction4Paragraph = true;
4304
 
        }
 
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();
4727
4706
{
4728
4707
        if (!HaveDoc || !HaveItem || !m_ScMW || m_ScMW->scriptIsRunning())
4729
4708
                return;
4730
 
        bool setter=Revert->isChecked();
4731
 
        CurItem->setImageFlippedH(setter);
4732
 
        CurItem->setReversed(setter);
4733
 
        CurItem->update();
4734
 
        emit DocChanged();
 
4709
        doc->itemSelection_SetItemTextReversed(Revert->isChecked());
4735
4710
}
4736
4711
 
4737
4712
 
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 &quot;insideness&quot; 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 &quot;insideness&quot; 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);
5797
5774
 
5798
 
        EditShape->setEnabled(!isLocked);
 
5775
        bool shapeEditLocked = isLocked;
 
5776
        if (HaveItem)
 
5777
                shapeEditLocked |=  CurItem->sizeLocked();
 
5778
        EditShape->setEnabled(!shapeEditLocked);
 
5779
 
5799
5780
        LayerGroup->setEnabled(!isLocked);
5800
5781
        Locked->setChecked(isLocked);
5801
5782
        if ((HaveDoc) && (HaveItem))
5810
5791
 
5811
5792
void PropertiesPalette::setSizeLocked(bool isSizeLocked)
5812
5793
{
5813
 
        bool b=isSizeLocked;
 
5794
        bool b = isSizeLocked;
5814
5795
        if (HaveItem && CurItem->locked())
5815
 
                b=true;
 
5796
                b = true;
5816
5797
        Width->setReadOnly(b);
5817
5798
        Height->setReadOnly(b);
5818
5799
        QPalette pal(qApp->palette());
5823
5804
        Width->setPalette(pal);
5824
5805
        Height->setPalette(pal);
5825
5806
        NoResize->setChecked(isSizeLocked);
 
5807
 
 
5808
        bool shapeEditLocked = isSizeLocked;
 
5809
        if (HaveItem)
 
5810
                shapeEditLocked |=  CurItem->locked();
 
5811
        EditShape->setEnabled(!shapeEditLocked);
5826
5812
}
5827
5813
 
5828
5814
void PropertiesPalette::setPrintingEnabled(bool isPrintingEnabled)