SHA256
1
0
forked from pool/scribus
OBS User unknown 2007-03-12 11:02:26 +00:00 committed by Git OBS Bridge
parent 6d0eecb243
commit d16e5bbfdb
4 changed files with 201 additions and 2 deletions

View File

@ -0,0 +1,21 @@
--- scribus/plugins/psimport/importps.cpp
+++ scribus/plugins/psimport/importps.cpp
@@ -626,7 +626,7 @@
filename = filename.mid(0, filename.length()-3) + "psd";
}
- qDebug(QString("import %6 image %1: %2x%3 @ (%4,%5) °%5").arg(filename).arg(w).arg(h).arg(x).arg(y).arg(angle).arg(device));
+ qDebug("%s", QString("import %6 image %1: %2x%3 @ (%4,%5) °%5").arg(filename).arg(w).arg(h).arg(x).arg(y).arg(angle).arg(device));
QString rawfile = filename.mid(0, filename.length()-3) + "dat";
QStringList args;
args.append( getShortPathName(PrefsManager::instance()->ghostscriptExecutable()) );
--- scribus/scimage.cpp
+++ scribus/scimage.cpp
@@ -4416,6 +4416,6 @@
QMessageBox::warning(ScMW, CommonStrings::trWarning, message, 1, 0, 0);
}
else if (!message.isEmpty())
- qWarning( message.local8Bit().data() );
+ qWarning("%s", message.local8Bit().data() );
return true;
}

View File

@ -0,0 +1,157 @@
--- scribus/plugins/scriptplugin/cmdmisc.cpp
+++ scribus/plugins/scriptplugin/cmdmisc.cpp
@@ -190,7 +190,7 @@
return NULL;
if(!checkHaveDocument())
return NULL;
- if (Layer == "")
+ if (Layer[0] == 0)
{
PyErr_SetString(PyExc_ValueError, QObject::tr("Cannot have an empty layer name.","python error"));
return NULL;
@@ -229,7 +229,7 @@
return NULL;
if(!checkHaveDocument())
return NULL;
- if (Name == "")
+ if (Name[0] == 0)
{
PyErr_SetString(PyExc_ValueError, QString("Cannot have an empty layer name"));
return NULL;
@@ -261,7 +261,7 @@
return NULL;
if(!checkHaveDocument())
return NULL;
- if (Name == "")
+ if (Name[0] == 0)
{
PyErr_SetString(PyExc_ValueError, QObject::tr("Cannot have an empty layer name.","python error"));
return NULL;
@@ -292,7 +292,7 @@
return NULL;
if(!checkHaveDocument())
return NULL;
- if (Name == "")
+ if (Name[0] == 0)
{
PyErr_SetString(PyExc_ValueError, QObject::tr("Cannot have an empty layer name.","python error"));
return NULL;
@@ -323,7 +323,7 @@
return NULL;
if(!checkHaveDocument())
return NULL;
- if (Name == "")
+ if (Name[0] == 0)
{
PyErr_SetString(PyExc_ValueError, QObject::tr("Cannot have an empty layer name.","python error"));
return NULL;
@@ -355,7 +355,7 @@
return NULL;
if(!checkHaveDocument())
return NULL;
- if (Name == "")
+ if (Name[0] == 0)
{
PyErr_SetString(PyExc_ValueError, QObject::tr("Cannot have an empty layer name.","python error"));
return NULL;
@@ -410,7 +410,7 @@
return NULL;
if(!checkHaveDocument())
return NULL;
- if (Name == "")
+ if (Name[0] == 0)
{
PyErr_SetString(PyExc_ValueError, QObject::tr("Cannot create layer without a name.","python error"));
return NULL;
--- scribus/plugins/scriptplugin/cmdobj.cpp
+++ scribus/plugins/scriptplugin/cmdobj.cpp
@@ -30,7 +30,7 @@
ScMW->doc->toolSettings.dWidth,
ScMW->doc->toolSettings.dBrush, ScMW->doc->toolSettings.dPen, true);
ScMW->doc->setRedrawBounding(ScMW->doc->Items->at(i));
- if (Name != "")
+ if (Name[0] != 0)
ScMW->doc->Items->at(i)->setItemName(QString::fromUtf8(Name));
return PyString_FromString(ScMW->doc->Items->at(i)->itemName().utf8());
}
@@ -59,7 +59,7 @@
return NULL;
}
ScMW->doc->setRedrawBounding(ScMW->doc->Items->at(i));
- if (Name != "")
+ if (Name[0] != 0)
ScMW->doc->Items->at(i)->setItemName(QString::fromUtf8(Name));
return PyString_FromString(ScMW->doc->Items->at(i)->itemName().utf8());
}
@@ -86,7 +86,7 @@
return NULL;
}
ScMW->doc->setRedrawBounding(ScMW->doc->Items->at(i));
- if (Name != "")
+ if (Name[0] != 0)
ScMW->doc->Items->at(i)->setItemName(QString::fromUtf8(Name));
return PyString_FromString(ScMW->doc->Items->at(i)->itemName().utf8());
}
@@ -113,7 +113,7 @@
return NULL;
}
ScMW->doc->setRedrawBounding(ScMW->doc->Items->at(i));
- if (Name != "")
+ if (Name[0] != 0)
ScMW->doc->Items->at(i)->setItemName(QString::fromUtf8(Name));
return PyString_FromString(ScMW->doc->Items->at(i)->itemName().utf8());
}
@@ -151,7 +151,7 @@
it->updateClip();
ScMW->doc->setRedrawBounding(it);
it->OwnPage = ScMW->doc->OnPage(it);
- if (Name != "")
+ if (Name[0] != 0)
it->setItemName(QString::fromUtf8(Name));
return PyString_FromString(it->itemName().utf8());
}
@@ -224,7 +224,7 @@
}
ScMW->view->SizeItem(it->PoLine.WidthHeight().x(), it->PoLine.WidthHeight().y(), ic, false, false, false);
ScMW->view->AdjustItemSize(it);
- if (Name != "")
+ if (Name[0] != 0)
{
it->setItemName(QString::fromUtf8(Name));
}
@@ -304,7 +304,7 @@
}
ScMW->view->SizeItem(it->PoLine.WidthHeight().x(), it->PoLine.WidthHeight().y(), ic, false, false, false);
ScMW->view->AdjustItemSize(it);
- if (Name != "")
+ if (Name[0] != 0)
it->setItemName(QString::fromUtf8(Name));
return PyString_FromString(it->itemName().utf8());
}
@@ -391,7 +391,7 @@
}
ScMW->view->SizeItem(it->PoLine.WidthHeight().x(), it->PoLine.WidthHeight().y(), ic, false, false, false);
ScMW->view->AdjustItemSize(it);
- if (Name != "")
+ if (Name[0] != 0)
it->setItemName(QString::fromUtf8(Name));
return PyString_FromString(it->itemName().utf8());
}
@@ -429,7 +429,7 @@
PageItem *it = ScMW->doc->Items->at(i);
ScMW->view->ToPathText();
ScMW->view->MoveItem(pageUnitXToDocX(x) - it->xPos(), pageUnitYToDocY(y) - it->yPos(), it);
- if (Name != "")
+ if (Name[0] != 0)
it->setItemName(QString::fromUtf8(Name));
return PyString_FromString(it->itemName().utf8());
}
@@ -532,7 +532,7 @@
return NULL;
}
// for current item only
- if (ScMW->doc->m_Selection->count() == 0 || name != "")
+ if (ScMW->doc->m_Selection->count() == 0 || name[0] != 0)
{
// quick hack to always apply on the right frame - pv
ScMW->view->Deselect(true);

View File

@ -1,3 +1,13 @@
-------------------------------------------------------------------
Mon Mar 12 09:54:04 CET 2007 - pgajdos@suse.cz
- fixed gcc warnings in beta version:
* program uses possibly exploitable format strings
(format-not-literal.patch)
* program compares a char* pointer with string literal
(string-literal-comparsion.patch)
* added CFLAG -fno-strict-aliasing inside scribus.spec
-------------------------------------------------------------------
Thu Mar 8 15:02:42 CET 2007 - pgajdos@suse.cz

View File

@ -28,9 +28,11 @@ Suggests: AdobeICCProfiles
Provides: scribus-short-words
Obsoletes: scribus-i18n-de scribus-i18n-en scribus-i18n-fr scribus-short-words
Version: 1.3.3.7
Release: 7
Release: 9
Source: %{name}-%{version}.tar.bz2
Patch: %{name}-%{version}_string-literal-comparsion.patch
Patch1: %{name}-%{version}_format-not-literal.patch
Patch2: %{name}-%{version}_string-literal-comparsion-b.patch
URL: http://www.scribus.net/
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Summary: Open Source Page Layout and Desktop Publishing (DTP)
@ -102,13 +104,15 @@ Authors:
%prep
%setup -q
%patch
%patch1
%patch2
%build
. /etc/opt/kde3/common_options
update_admin --no-unsermake
#autoconf
export CFLAGS="$RPM_OPT_FLAGS"
export CXXFLAGS="$RPM_OPT_FLAGS"
export CXXFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing"
./configure \
--prefix=%{prefix} \
--libdir=%{_libdir} \
@ -171,6 +175,13 @@ rm -rf $RPM_BUILD_ROOT
%{_prefix}/include/scribus
%changelog
* Mon Mar 12 2007 - pgajdos@suse.cz
- fixed gcc warnings in beta version:
* program uses possibly exploitable format strings
(format-not-literal.patch)
* program compares a char* pointer with string literal
(string-literal-comparsion.patch)
* added CFLAG -fno-strict-aliasing inside scribus.spec
* Thu Mar 08 2007 - pgajdos@suse.cz
- fixed 'warning: comparsion with string literal' (#233016, #228963)
- string-literal-comparsion.patch