Subversion Repositories Scribus

Compare Revisions

Ignore whitespace Rev 863 → Rev 864

/trunk/Scribus/ChangeLogCVS
1,5 → 1,15
Changes since 1.2
 
10.12.2004
* bug # 931: Insert Special should be disabled when not usable
* bug #1100: libfreetype not found by ./configure
* bug #1328: SVG Import: incorrect units
* bug #1361: after attaching text to path the shape cannot be resized without dissappearing
* bug #1369: Crash when using <esc> to end line drawing
* bug #1370: Bezier tool does not set document changed when escaped pressed to end drawing.
* bug #1372: Change of Translator email-adress.
* bug #1373: Updated nb_NO translation.
 
09.12.2004
* bug # 984: Can Search/Replace dialog remember from last time?
* bug #1135: Page number in TTF font doesn't print
/trunk/Scribus/scribus/page.cpp
7205,6 → 7205,7
double dy = bb->Ypos - b->Ypos;
MoveItem(dx, dy, b);
b->Rot = bb->Rot;
b->FrameType = 3;
Deselect(true);
SelectItemNr(bb->ItemNr);
DeleteItem();
/trunk/Scribus/scribus/libabout/about.cpp
58,7 → 58,7
tabLayout1->addWidget( PixmapLabel1 );
BuildID = new QLabel( tab, "BB" );
BuildID->setAlignment(Qt::AlignCenter);
QString bu = tr("%1. %2 %3 ").arg("09").arg("December").arg("2004");
QString bu = tr("%1. %2 %3 ").arg("10").arg("December").arg("2004");
#ifdef HAVE_CMS
bu += "C";
#else
/trunk/Scribus/scribus/scribus.cpp
2643,6 → 2643,8
if (Nr != -1)
b = doc->ActPage->SelItem.at(0);
ObjMenu->setItemEnabled(PfadDT, 0);
if (PluginMap.contains(1))
extraMenu->setItemEnabled(PluginMap[1].MenuID, 0);
view->HR->ItemPosValid = false;
view->HR->repX = false;
view->HR->repaint();
2746,6 → 2748,8
{
setTBvals(b);
editMenu->setItemEnabled(edid5, 1);
if (PluginMap.contains(1))
extraMenu->setItemEnabled(PluginMap[1].MenuID, 1);
view->HR->ItemPos = b->Xpos;
view->HR->ItemEndPos = b->Xpos+b->Width;
if (b->Pcolor2 != "None")
5216,6 → 5220,8
delete doc->CurTimer;
doc->CurTimer = 0;
editMenu->setItemEnabled(edid4, 0);
if (PluginMap.contains(1))
extraMenu->setItemEnabled(PluginMap[1].MenuID, 0);
doc->ActPage->slotDoCurs(false);
if (b != 0)
{
5242,6 → 5248,8
setTBvals(b);
}
editMenu->setItemEnabled(edid3, 0);
if (PluginMap.contains(1))
extraMenu->setItemEnabled(PluginMap[1].MenuID, 1);
if (!Buffer2.isNull())
{
if (!Buffer2.startsWith("<SCRIBUSELEM"))
/trunk/Scribus/scribus/plugins/svgimplugin/svgplugin.cpp
155,6 → 155,12
QDomElement docElem = inpdoc.documentElement();
double width = !docElem.attribute("width").isEmpty() ? parseUnit(docElem.attribute( "width" )) : 550.0;
double height = !docElem.attribute("height").isEmpty() ? parseUnit(docElem.attribute( "height" )) : 841.0;
if (!docElem.attribute("width").isEmpty())
getDefaultUnit(docElem.attribute( "width" ));
else if (!docElem.attribute("height").isEmpty())
getDefaultUnit(docElem.attribute( "height" ));
else
Conversion = 1.0 / 1.25;
if (!Prog->HaveDoc)
{
Prog->doFileNew(width, height, 0, 0, 0, 0, 0, 0, false, false, 0, false, 0, 1, "Custom");
596,6 → 602,48
}
 
/*!
\fn void SVGPlug::getDefaultUnit(const QString &unit)
\author Franz Schmid
\date
\brief
\param unit const QString &
\retval none
*/
void SVGPlug::getDefaultUnit(const QString &unit)
{
QString unitval=unit;
QString un = unit.right(2);
Conversion = 1.0;
if( un == "pt" )
{
unitval.replace( "pt", "" );
Conversion = 1.0;
}
else if( un == "cm" )
{
unitval.replace( "cm", "" );
Conversion = 72.0 / 2.54;
}
else if( un == "mm" )
{
unitval.replace( "mm", "" );
Conversion = 72.0 / 25.4;
}
else if( un == "in" )
{
unitval.replace( "in", "" );
Conversion = 72.0;
}
else if( un == "px" )
{
unitval.replace( "px", "" );
Conversion = 0.8;
}
if (unitval == unit)
Conversion = 0.8;
}
 
/*!
\fn double SVGPlug::parseUnit(const QString &unit)
\author Franz Schmid
\date
605,6 → 653,7
*/
double SVGPlug::parseUnit(const QString &unit)
{
bool noUnit = false;
QString unitval=unit;
if( unit.right( 2 ) == "pt" )
unitval.replace( "pt", "" );
616,6 → 665,8
unitval.replace( "in", "" );
else if( unit.right( 2 ) == "px" )
unitval.replace( "px", "" );
if (unitval == unit)
noUnit = true;
double value = unitval.toDouble();
if( unit.right( 2 ) == "pt" )
value = value;
626,7 → 677,9
else if( unit.right( 2 ) == "in" )
value = value * 72;
else if( unit.right( 2 ) == "px" )
value = value;
value = value * 0.8;
else if (noUnit)
value = value * 0.8;
return value;
}
 
771,6 → 824,7
}
number = integer + decimal;
number *= sign * pow( static_cast<double>(10), static_cast<double>( expsign * exponent ) );
number *= Conversion;
 
// skip the following space
if(*ptr == ' ')
/trunk/Scribus/scribus/plugins/svgimplugin/svgplugin.h
111,7 → 111,8
void addGraphicContext();
void setupTransform( const QDomElement &e );
void parseGroup(const QDomElement &e);
double fromPercentage( const QString &s );
double fromPercentage( const QString &s );
void getDefaultUnit(const QString &unit);
double parseUnit(const QString &unit);
QWMatrix parseTransform(const QString &transform);
const char * getCoord( const char *ptr, double &number );
134,7 → 135,7
ScribusDoc* Doku;
ScribusApp* Prog;
QDomDocument inpdoc;
double CurrX, CurrY, StartX, StartY;
double CurrX, CurrY, StartX, StartY, Conversion;
int PathLen;
QPtrList<PageItem> Elements;
QPtrStack<SvgStyle> m_gc;