Subversion Repositories Scribus

Compare Revisions

Regard whitespace Rev 4745 → Rev 4746

/branches/Version13x/Scribus/scribus/pageitem_textframe.cpp
2244,7 → 2244,7
altx = itemText.at(pos)->yp;
if ( altx > alty )
{
// we was at begin of line
// we were at begin of line
break;
}
}
2255,6 → 2255,9
}
else
{
//Control Home for start of frame text
pos=0;
/*
// paragraph begin
if ( pos < len &&
itemText.at(pos)->ch.at(0).latin1() == 13 )
2267,10 → 2270,14
}
else
--pos;
*/
}
CPos = pos;
if ( buttonState & ShiftButton )
ExpandSel(-1, oldPos);
if ( this->HasSel )
view->RefreshItem(this);
ScMW->setTBvals(this);
break;
case Key_End:
// go to end of line
2315,6 → 2322,9
}
else
{
//Control End for end of frame text
pos=static_cast<int>(itemText.count());
/*
// go to end of paragraph
if ( itemText.at(CPos)->ch.at(0).latin1() == 13 )
{
2328,12 → 2338,40
else
++pos;
}
*/
CPos = pos;
}
if ( buttonState & ShiftButton )
ExpandSel(1, oldPos);
if ( this->HasSel )
view->RefreshItem(this);
ScMW->setTBvals(this);
break;
case Key_Down:
if (buttonState & ControlButton)
{
// go to end of paragraph
len = static_cast<int>(itemText.count());
if ( CPos >= len )
break; // at end of frame
if ( itemText.at(CPos)->ch.at(0).latin1() == 13 )
{
break;
}
pos = CPos;
while ( pos < len )
{
if ( itemText.at(pos)->ch.at(0).latin1() == 13 )
break;
else
++pos;
}
CPos = pos;
if ( buttonState & ShiftButton )
ExpandSel(1, oldPos);
}
else
{
if (CPos != static_cast<int>(itemText.count()))
{
bool down1=false;
2402,11 → 2440,37
}
}
}
}
if ( this->HasSel )
view->RefreshItem(this);
ScMW->setTBvals(this);
break;
case Key_Up:
if (buttonState & ControlButton)
{
if ( (pos = CPos) == 0 )
break; // at begin of frame
len = static_cast<int>(itemText.count());
if ( pos == len )
pos--;
// paragraph begin
if ( pos < len &&
itemText.at(pos)->ch.at(0).latin1() == 13 )
--pos;
while(pos > 0 )
if ( itemText.at(pos)->ch.at(0).latin1() == 13 )
{
++pos;
break;
}
else
--pos;
CPos = pos;
if ( buttonState & ShiftButton )
ExpandSel(-1, oldPos);
}
else
{
if (CPos > 0)
{
if (CPos == static_cast<int>(itemText.count()))
2467,6 → 2531,7
//currItem = currItem->BackBox;
}
}
}
if ( this->HasSel )
view->RefreshItem(this);
ScMW->setTBvals(this);