Subversion Repositories Scribus

Compare Revisions

Regard whitespace Rev 19754 → Rev 19755

/branches/Version14x/Scribus/scribus/scribusdoc.cpp
8286,11 → 8286,11
}
 
 
bool ScribusDoc::startAlign()
bool ScribusDoc::startAlign(uint minObjects)
{
buildAlignItemList();
uint alignObjectsCount=AObjects.count();
if (alignObjectsCount==0)
if (alignObjectsCount < minObjects)
return false;
bool oneLocked=false;
8342,7 → 8342,6
return true;
}
 
 
void ScribusDoc::endAlign()
{
changed();
8840,11 → 8839,9
 
void ScribusDoc::itemSelection_DistributeLeft()
{
if (!startAlign())
if (!startAlign(2))
return;
uint alignObjectsCount=AObjects.count();
if (alignObjectsCount<=1)
return;
QMap<double,uint> Xsorted;
for (uint a = 0; a < alignObjectsCount; ++a)
{
8880,11 → 8877,9
 
void ScribusDoc::itemSelection_DistributeCenterH()
{
if (!startAlign())
if (!startAlign(2))
return;
uint alignObjectsCount=AObjects.count();
if (alignObjectsCount<=1)
return;
QMap<double,uint> Xsorted;
for (uint a = 0; a < alignObjectsCount; ++a)
{
8920,11 → 8915,9
 
void ScribusDoc::itemSelection_DistributeRight()
{
if (!startAlign())
if (!startAlign(2))
return;
uint alignObjectsCount=AObjects.count();
if (alignObjectsCount<=1)
return;
QMap<double,uint> Xsorted;
for (uint a = 0; a < alignObjectsCount; ++a)
{
8960,11 → 8953,9
 
void ScribusDoc::itemSelection_DistributeDistH(bool usingDistance, double distance, bool reverseDistribute)
{
if (!startAlign())
if (!startAlign(2))
return;
uint alignObjectsCount=AObjects.count();
if (alignObjectsCount<=1)
return;
QMap<double,uint> X1sorted, X2sorted;
for (uint a = 0; a < alignObjectsCount; ++a)
{
9045,11 → 9036,9
 
void ScribusDoc::itemSelection_DistributeBottom()
{
if (!startAlign())
if (!startAlign(2))
return;
uint alignObjectsCount=AObjects.count();
if (alignObjectsCount<=1)
return;
QMap<double,uint> Ysorted;
for (uint a = 0; a < alignObjectsCount; ++a)
{
9085,11 → 9074,9
 
void ScribusDoc::itemSelection_DistributeCenterV()
{
if (!startAlign())
if (!startAlign(2))
return;
uint alignObjectsCount=AObjects.count();
if (alignObjectsCount<=1)
return;
QMap<double,uint> Ysorted;
for (uint a = 0; a < alignObjectsCount; ++a)
{
9125,11 → 9112,9
 
void ScribusDoc::itemSelection_DistributeTop()
{
if (!startAlign())
if (!startAlign(2))
return;
uint alignObjectsCount=AObjects.count();
if (alignObjectsCount<=1)
return;
QMap<double,uint> Ysorted;
for (uint a = 0; a < alignObjectsCount; ++a)
{
9165,11 → 9150,9
 
void ScribusDoc::itemSelection_DistributeDistV(bool usingDistance, double distance, bool reverseDistribute)
{
if (!startAlign())
if (!startAlign(2))
return;
uint alignObjectsCount=AObjects.count();
if (alignObjectsCount<=1)
return;
QMap<double,uint> Y1sorted, Y2sorted;
for (uint a = 0; a < alignObjectsCount; ++a)
{
9251,11 → 9234,9
 
void ScribusDoc::itemSelection_DistributeAcrossPage(bool useMargins)
{
if (!startAlign())
if (!startAlign(2))
return;
uint alignObjectsCount=AObjects.count();
if (alignObjectsCount<=1)
return;
QMap<double,uint> X1sorted, X2sorted;
for (uint a = 0; a < alignObjectsCount; ++a)
{
9303,11 → 9284,9
 
void ScribusDoc::itemSelection_DistributeDownPage(bool useMargins)
{
if (!startAlign())
if (!startAlign(2))
return;
uint alignObjectsCount=AObjects.count();
if (alignObjectsCount<=1)
return;
QMap<double,uint> Y1sorted, Y2sorted;
for (uint a = 0; a < alignObjectsCount; ++a)
{
/branches/Version14x/Scribus/scribus/scribusdoc.h
791,7 → 791,7
typedef enum {alignFirst, alignLast, alignPage, alignMargins, alignGuide, alignSelection } AlignTo;
typedef enum {alignByMoving, alignByResizing } AlignMethod;
void buildAlignItemList(Selection* customSelection=0);
bool startAlign();
bool startAlign(uint minObjects = 1);
void endAlign();
/**
* \brief Insert a color into the documents color list