Subversion Repositories Scribus

Compare Revisions

Regard whitespace Rev 18203 → Rev 18204

/trunk/Scribus/scribus/scribuscore.cpp
263,7 → 263,7
bool ScribusCore::isMacGUI() const
{
// Do it statically for now
#if defined(Q_WS_MAC)
#if defined(Q_OS_MAC)
return true;
#else
return false;
288,7 → 288,7
#if defined(_WIN32)
return false;
//Mac Aqua - switch
#elif defined(Q_WS_MAC)
#elif defined(Q_OS_MAC)
return true;
#else
//Gnome - switch
/trunk/Scribus/scribus/scfonts.cpp
41,7 → 41,7
#include "scribus.h"
#include "scribuscore.h"
#include "scribusdoc.h"
#ifdef Q_WS_X11
#ifdef Q_OS_LINUX
#include <X11/X.h>
#include <X11/Xlib.h>
#endif
686,7 → 686,7
FT_Done_FreeType( library );
}
 
#elif defined(Q_WS_X11)
#elif defined(Q_OS_LINUX)
 
void SCFonts::AddXFontPath()
{
859,7 → 859,7
AddFontconfigFonts();
#else
// on X11 look there:
#ifdef Q_WS_X11
#ifdef Q_OS_LINUX
AddXFontPath();
AddXFontServerPath();
#endif
/trunk/Scribus/scribus/scclocale.cpp
21,7 → 21,7
{
qLocale.setNumberOptions(QLocale::OmitGroupSeparator);
 
#if defined(Q_WS_WIN)
#if defined(Q_OS_WIN)
cLocale = _create_locale(LC_ALL, "C");
#else
#if not defined(Q_OS_SOLARIS) and not defined(Q_OS_OPENBSD) and not defined(Q_OS_FREEBSD) and not defined(Q_OS_HAIKU)
32,7 → 32,7
 
ScCLocale::~ScCLocale()
{
#if defined(Q_WS_WIN)
#if defined(Q_OS_WIN)
_free_locale(cLocale);
#else
#if not defined(Q_OS_SOLARIS) and not defined(Q_OS_OPENBSD) and not defined(Q_OS_FREEBSD) and not defined(Q_OS_HAIKU)
107,7 → 107,7
}
else
{
#if defined(Q_WS_WIN)
#if defined(Q_OS_WIN)
return _strtod_l(str, endptr, that()->cLocale);
#else
#if defined(Q_OS_SOLARIS) or defined (Q_OS_OPENBSD) or defined(Q_OS_FREEBSD) or defined(Q_OS_HAIKU)
/trunk/Scribus/scribus/pageitem.cpp
133,6 → 133,10
snapToPatchGrid(other.snapToPatchGrid),
Cols(other.Cols),
ColGap(other.ColGap),
m_startArrowIndex(other.m_startArrowIndex),
m_endArrowIndex(other.m_endArrowIndex),
m_startArrowScale(other.m_startArrowScale),
m_endArrowScale(other.m_endArrowScale),
PLineArt(other.PLineArt),
PLineEnd(other.PLineEnd),
PLineJoin(other.PLineJoin),
175,11 → 179,6
isBookmark(other.isBookmark),
HasSel(other.HasSel),
isAutoText(other.isAutoText),
BackBox(NULL), // otherwise other.BackBox->NextBox would be inconsistent
NextBox(NULL), // otherwise other.NextBox->BackBox would be inconsistent
firstChar(0), // since this box is unlinked now
MaxChars(0), // since the layout is invalid now
m_sampleItem(false),
inPdfArticle(other.inPdfArticle),
isRaster(other.isRaster),
OldB(other.OldB),
187,7 → 186,6
OldB2(other.OldB2),
OldH2(other.OldH2),
Sizing(other.Sizing),
// toPixmap(other.toPixmap),
LayerID(other.LayerID),
ScaleType(other.ScaleType),
AspectRatio(other.AspectRatio),
220,64 → 218,6
ChangedMasterItem(other.ChangedMasterItem),
OnMasterPage(other.OnMasterPage),
isEmbedded(other.isEmbedded),
 
// protected
undoManager(other.undoManager),
m_ItemType(other.m_ItemType),
AnName(other.AnName),
gradientVal(other.gradientVal),
patternVal(other.patternVal),
patternScaleX(other.patternScaleX),
patternScaleY(other.patternScaleY),
patternOffsetX(other.patternOffsetX),
patternOffsetY(other.patternOffsetY),
patternRotation(other.patternRotation),
patternSkewX(other.patternSkewX),
patternSkewY(other.patternSkewY),
patternMirrorX(other.patternMirrorX),
patternMirrorY(other.patternMirrorY),
fillColorVal(other.fillColorVal),
lineColorVal(other.lineColorVal),
lineShadeVal(other.lineShadeVal),
fillShadeVal(other.fillShadeVal),
fillTransparencyVal(other.fillTransparencyVal),
lineTransparencyVal(other.lineTransparencyVal),
fillBlendmodeVal(other.fillBlendmodeVal),
lineBlendmodeVal(other.lineBlendmodeVal),
m_ImageIsFlippedH(other.m_ImageIsFlippedH),
m_ImageIsFlippedV(other.m_ImageIsFlippedV),
m_Locked(other.m_Locked),
m_SizeLocked(other.m_SizeLocked),
m_SizeHLocked(other.m_SizeHLocked),
m_SizeVLocked(other.m_SizeVLocked),
textFlowModeVal(other.textFlowModeVal),
pageItemAttributes(other.pageItemAttributes),
m_PrintEnabled(other.m_PrintEnabled),
tagged(other.tagged),
fillQColor(other.fillQColor),
strokeQColor(other.strokeQColor),
GrColorP1QColor(other.GrColorP1QColor),
GrColorP2QColor(other.GrColorP2QColor),
GrColorP3QColor(other.GrColorP3QColor),
GrColorP4QColor(other.GrColorP4QColor),
m_xPos(other.m_xPos),
m_yPos(other.m_yPos),
m_width(other.m_width),
m_height(other.m_height),
m_rotation(other.m_rotation),
m_isSelected(other.m_isSelected),
m_imageXScale(other.m_imageXScale),
m_imageYScale(other.m_imageYScale),
m_imageXOffset(other.m_imageXOffset),
m_imageYOffset(other.m_imageYOffset),
m_imageRotation(other.m_imageRotation),
m_isReversed(other.m_isReversed),
m_startArrowIndex(other.m_startArrowIndex),
m_endArrowIndex(other.m_endArrowIndex),
m_startArrowScale(other.m_startArrowScale),
m_endArrowScale(other.m_endArrowScale),
m_textDistanceMargins(other.m_textDistanceMargins),
firstLineOffsetP(other.firstLineOffsetP),
m_roundedCorderRadius(other.m_roundedCorderRadius),
oldXpos(other.oldXpos),
oldYpos(other.oldYpos),
336,7 → 276,65
patternMaskMirrorX(other.patternMaskMirrorX),
patternMaskMirrorY(other.patternMaskMirrorY),
patternMaskVal(other.patternMaskVal),
mask_gradient(other.mask_gradient)
mask_gradient(other.mask_gradient),
// protected
undoManager(other.undoManager),
BackBox(NULL), // otherwise other.BackBox->NextBox would be inconsistent
NextBox(NULL), // otherwise other.NextBox->BackBox would be inconsistent
firstChar(0), // since this box is unlinked now
MaxChars(0), // since the layout is invalid now
m_sampleItem(false),
m_textDistanceMargins(other.m_textDistanceMargins),
m_ItemType(other.m_ItemType),
AnName(other.AnName),
gradientVal(other.gradientVal),
patternVal(other.patternVal),
patternScaleX(other.patternScaleX),
patternScaleY(other.patternScaleY),
patternOffsetX(other.patternOffsetX),
patternOffsetY(other.patternOffsetY),
patternRotation(other.patternRotation),
patternSkewX(other.patternSkewX),
patternSkewY(other.patternSkewY),
patternMirrorX(other.patternMirrorX),
patternMirrorY(other.patternMirrorY),
fillColorVal(other.fillColorVal),
lineColorVal(other.lineColorVal),
lineShadeVal(other.lineShadeVal),
fillShadeVal(other.fillShadeVal),
fillTransparencyVal(other.fillTransparencyVal),
lineTransparencyVal(other.lineTransparencyVal),
fillBlendmodeVal(other.fillBlendmodeVal),
lineBlendmodeVal(other.lineBlendmodeVal),
m_ImageIsFlippedH(other.m_ImageIsFlippedH),
m_ImageIsFlippedV(other.m_ImageIsFlippedV),
m_Locked(other.m_Locked),
m_SizeLocked(other.m_SizeLocked),
m_SizeHLocked(other.m_SizeHLocked),
m_SizeVLocked(other.m_SizeVLocked),
textFlowModeVal(other.textFlowModeVal),
pageItemAttributes(other.pageItemAttributes),
m_PrintEnabled(other.m_PrintEnabled),
tagged(other.tagged),
fillQColor(other.fillQColor),
strokeQColor(other.strokeQColor),
GrColorP1QColor(other.GrColorP1QColor),
GrColorP2QColor(other.GrColorP2QColor),
GrColorP3QColor(other.GrColorP3QColor),
GrColorP4QColor(other.GrColorP4QColor),
m_xPos(other.m_xPos),
m_yPos(other.m_yPos),
m_width(other.m_width),
m_height(other.m_height),
m_rotation(other.m_rotation),
m_isSelected(other.m_isSelected),
m_imageXScale(other.m_imageXScale),
m_imageYScale(other.m_imageYScale),
m_imageXOffset(other.m_imageXOffset),
m_imageYOffset(other.m_imageYOffset),
m_imageRotation(other.m_imageRotation),
m_isReversed(other.m_isReversed),
firstLineOffsetP(other.firstLineOffsetP)
{
QString tmp;
m_Doc->TotalItems++;
/trunk/Scribus/scribus/actionmanager.cpp
67,7 → 67,7
unicodeCharActionNames=new QStringList();
undoManager = UndoManager::instance();
 
#ifdef Q_WS_MAC
#ifdef Q_OS_MAC
noIcon = loadIcon("noicon.xpm");
#endif
 
1295,7 → 1295,7
{
(*scrActions)[*it]->setShortcutContext(Qt::WidgetShortcut); // in theory, this should be enough, but...
(*scrActions)[*it]->saveShortcut();
#ifdef Q_WS_MAC
#ifdef Q_OS_MAC
if ((*scrActions)[*it]->menu() != NULL)
(*scrActions)[*it]->setEnabled(false);
#endif
1313,7 → 1313,7
{
(*scrActions)[*it]->setShortcutContext(Qt::WindowShortcut); // see above
(*scrActions)[*it]->restoreShortcut();
#ifdef Q_WS_MAC
#ifdef Q_OS_MAC
(*scrActions)[*it]->setEnabled(true);
#endif
}
/trunk/Scribus/scribus/pageitem_textframe.cpp
4586,7 → 4586,7
ushort uni = k->text().at(0).unicode();
controlCharHack = ((uni < 32) && (uni != SpecialChars::TAB.unicode()));
}
#if defined (Q_WS_X11)
#if defined (Q_OS_LINUX)
if ((k->text().size()==1) && (k->modifiers() & Qt::ShiftModifier) && (k->modifiers() & Qt::ControlModifier) && (k->nativeVirtualKey() < 1000))
x11Hack=true;
#endif
/trunk/Scribus/scribus/ui/colorcombo.h
18,7 → 18,7
 
#include <QComboBox>
 
#ifdef Q_WS_MAC
#ifdef Q_OS_MAC
#include <QMacStyle>
#endif
 
35,7 → 35,7
 
private:
 
#ifdef Q_WS_MAC
#ifdef Q_OS_MAC
/// use listbox instead of popupmenu for combo boxes
class ScMacStyle : public QMacStyle
{
/trunk/Scribus/scribus/ui/helpbrowser.cpp
145,7 → 145,7
firstRun=true;
setupUi(this);
helpNav = new HelpNavigation(this);
#if defined(Q_WS_MAC) && defined(HELP_NAV_AS_DRAWER)
#if defined(Q_OS_MAC) && defined(HELP_NAV_AS_DRAWER)
// TODO
#else
QDockWidget * dckw = new QDockWidget(tr("Navigation"),this);
/trunk/Scribus/scribus/ui/sccombobox.cpp
15,7 → 15,7
 
#include "sccombobox.h"
 
#ifdef Q_WS_MAC
#ifdef Q_OS_MAC
 
#include <QMacStyle>
 
33,7 → 33,7
 
ScComboBox::ScComboBox( QWidget* parent ) : QComboBox(parent)
{
#ifdef Q_WS_MAC
#ifdef Q_OS_MAC
setStyle( new ScMacStyle );
#endif
//Qt4 setListBox( new Q3ListBox( this, "in-combo", Qt::WType_Popup ) );
/trunk/Scribus/scribus/ui/about.cpp
162,13 → 162,6
bu += "-Windows";
#elif defined(Q_OS_MAC)
bu += "-Mac/";
# if defined(Q_WS_MACX)
bu += "Aqua";
# elif defined(Q_WS_X11)
bu += "X11";
# else
bu += "?";
# endif
#elif defined(Q_OS_DARWIN)
// dunno if anyone uses this...
bu += "-Darwin";
/trunk/Scribus/scribus/ui/sctreewidget.cpp
44,7 → 44,7
// this is a top-level item.
QStyleOptionButton buttonOption;
buttonOption.state = option.state;
#if defined(Q_WS_MAC) || defined(Q_WS_WIN)
#if defined(Q_OS_MAC) || defined(Q_OS_WIN)
buttonOption.state |= QStyle::State_Raised;
#endif
buttonOption.state &= ~QStyle::State_HasFocus;
/trunk/Scribus/scribus/ui/storyeditor.cpp
1545,7 → 1545,7
{
m_spellActive=false;
prefsManager=PrefsManager::instance();
#ifdef Q_WS_MAC
#ifdef Q_OS_MAC
noIcon = loadIcon("noicon.xpm");
#endif
buildGUI();
/trunk/Scribus/scribus/ui/scfilewidget.cpp
60,7 → 60,7
needed e.g on OpenSuse patched Qt versions */
void ScFileWidget::accept()
{
#ifndef Q_WS_X11
#ifndef Q_OS_LINUX
QFileDialog::accept();
#endif
}
/trunk/Scribus/scribus/ui/hruler.cpp
53,7 → 53,7
#include "util_icon.h"
 
 
#ifdef Q_WS_MAC
#ifdef Q_OS_MAC
#define topline 1
#else
#define topline 3
/trunk/Scribus/scribus/ui/scmenu.cpp
139,7 → 139,7
if (newMenuAction)
{
#ifdef Q_WS_MAC
#ifdef Q_OS_MAC
bool menuListHasNoIcons = true;
// look for ScrAction or ScrPopupMenu from the end of the list
// QList< QPointer<QObject> >::Iterator it = menuItemList.end();
196,7 → 196,7
//if (menuItemList.findRef(newMenuAction)!=-1)
// return false;
#ifdef Q_WS_MAC
#ifdef Q_OS_MAC
if (newMenuAction && afterMenuAction)
if (newMenuAction->icon().isNull() && ! (afterMenuAction->icon().isNull()))
newMenuAction->setIcon(loadIcon("noicon.xpm"));
/trunk/Scribus/scribus/ui/colorcombo.cpp
19,7 → 19,7
 
ColorCombo::ColorCombo( QWidget* parent ) : QComboBox(parent)
{
#ifdef Q_WS_MAC
#ifdef Q_OS_MAC
// setStyle( new ColorCombo::ScMacStyle() );
#endif
setEditable(false);
31,7 → 31,7
 
ColorCombo::ColorCombo( bool rw, QWidget* parent ) : QComboBox(parent)
{
#ifdef Q_WS_MAC
#ifdef Q_OS_MAC
// setStyle( new ColorCombo::ScMacStyle() );
#endif
setEditable(rw);
/trunk/Scribus/scribus/ui/charzoom.cpp
7,7 → 7,7
 
 
CharZoom::CharZoom(QWidget* parent, uint currentChar, ScFace face)
#ifdef Q_WS_MAC
#ifdef Q_OS_MAC
: QDialog( parent, Qt::FramelessWindowHint | Qt::Popup)
#else
: QDialog( parent, Qt::FramelessWindowHint)
/trunk/Scribus/scribus/text/frect.h
132,7 → 132,7
friend bool operator!=( const FRect &, const FRect & );
 
private:
#if defined(Q_WS_X11) || defined(Q_OS_TEMP)
#if defined(Q_OS_LINUX) || defined(Q_OS_TEMP)
friend void qt_setCoords( FRect *r, qreal xp1, qreal yp1, qreal xp2, qreal yp2 );
#endif
 
/trunk/Scribus/scribus/scribus.cpp
280,7 → 280,7
UrlLauncher::instance();
mainWindowStatusLabel=0;
ExternalApp=0;
#ifdef Q_WS_MAC
#ifdef Q_OS_MAC
noIcon = loadIcon("noicon.xpm");
#endif
}
/trunk/Scribus/scribus/plugins/import/ai/importai.cpp
501,12 → 501,7
}
tmpSel->setGroupRect();
ScElemMimeData* md = ScriXmlDoc::WriteToMimeData(m_Doc, tmpSel);
/*#ifndef Q_WS_MAC*/
// see #2196
m_Doc->itemSelection_DeleteItem(tmpSel);
/*#else
qDebug("aiimport: leaving items on page");
#endif*/
m_Doc->view()->updatesOn(true);
if ((importedColors.count() != 0) && (!((flags & LoadSavePlugin::lfKeepGradients) || (flags & LoadSavePlugin::lfKeepColors) || (flags & LoadSavePlugin::lfKeepPatterns))))
{
/trunk/Scribus/scribus/plugins/import/oodraw/oodrawimp.cpp
586,10 → 586,7
}
tmpSel->setGroupRect();
ScElemMimeData* md = ScriXmlDoc::WriteToMimeData(m_Doc, tmpSel);
/*#ifndef Q_WS_MAC*/
// see #2196, #2526
m_Doc->itemSelection_DeleteItem(tmpSel);
/*#endif*/
m_Doc->view()->updatesOn(true);
m_Doc->m_Selection->delaySignalsOff();
// We must copy the TransationSettings object as it is owned
/trunk/Scribus/scribus/plugins/import/xfig/importxfig.cpp
399,12 → 399,7
}
tmpSel->setGroupRect();
ScElemMimeData* md = ScriXmlDoc::WriteToMimeData(m_Doc, tmpSel);
/*#ifndef Q_WS_MAC*/
// see #2196
m_Doc->itemSelection_DeleteItem(tmpSel);
/*#else
qDebug("xfigimport: leaving items on page");
#endif*/
m_Doc->view()->updatesOn(true);
m_Doc->m_Selection->delaySignalsOff();
// We must copy the TransationSettings object as it is owned
/trunk/Scribus/scribus/plugins/import/svg/svgplugin.cpp
506,10 → 506,7
}
tmpSel->setGroupRect();
ScElemMimeData* md = ScriXmlDoc::WriteToMimeData(m_Doc, tmpSel);
/*#ifndef Q_WS_MAC*/
// see #2526
m_Doc->itemSelection_DeleteItem(tmpSel);
/*#endif*/
m_Doc->view()->updatesOn(true);
if ((importedColors.count() != 0) && (!((flags & LoadSavePlugin::lfKeepGradients) || (flags & LoadSavePlugin::lfKeepColors) || (flags & LoadSavePlugin::lfKeepPatterns))))
{
/trunk/Scribus/scribus/scpaths.cpp
14,7 → 14,7
 
// On Qt/Mac we need CoreFoundation to discover the location
// of the app bundle.
#ifdef Q_WS_MAC
#ifdef Q_OS_MAC
#include <CoreFoundation/CoreFoundation.h>
#endif
 
62,7 → 62,7
{
// On MacOS/X, override the compile-time settings with a location
// obtained from the system.
#ifdef Q_WS_MAC
#ifdef Q_OS_MAC
QString pathPtr(bundleDir());
qDebug() << QString("scpaths: bundle at %1").arg(pathPtr);
m_shareDir = QString("%1/Contents/share/scribus/").arg(pathPtr);
117,7 → 117,7
{
// On MacOS/X, override the compile-time settings with a location
// obtained from the system.
#ifdef Q_WS_MAC
#ifdef Q_OS_MAC
// Set up the various app paths to look inside the app bundle
CFURLRef pluginRef = CFBundleCopyBundleURL(CFBundleGetMainBundle());
CFStringRef macPath = CFURLCopyFileSystemPath(pluginRef, kCFURLPOSIXPathStyle);
274,7 → 274,7
foreach (dir, dictDirList)
spellDirs.append(progFiles+windowsLOPath + "/" + dir + "/");
}
#elif defined(Q_WS_X11)
#elif defined(Q_OS_LINUX)
d.setPath(linuxHunspellPath);
if (d.exists())
spellDirs.append(linuxHunspellPath);
309,7 → 309,7
iccProfDirs.append(QDir::homePath()+"/Library/ColorSync/Profiles/");
iccProfDirs.append("/System/Library/ColorSync/Profiles/");
iccProfDirs.append("/Library/ColorSync/Profiles/");
#elif defined(Q_WS_X11)
#elif defined(Q_OS_LINUX)
iccProfDirs.append(QDir::homePath()+"/color/icc/");
iccProfDirs.append(QDir::homePath()+"/.color/icc/");
iccProfDirs.append(QDir::homePath()+"/.local/share/color/icc/");
372,7 → 372,7
#ifdef Q_OS_MAC
createDirs.append(QDir::homePath()+"/create/swatches/");
createDirs.append(QDir::homePath()+"/.create/swatches/");
#elif defined(Q_WS_X11)
#elif defined(Q_OS_LINUX)
createDirs.append(QDir::homePath()+"/create/swatches/");
createDirs.append(QDir::homePath()+"/.create/swatches/");
createDirs.append("/usr/share/create/swatches/");
/trunk/Scribus/scribus/scclocale.h
25,7 → 25,7
#include <locale.h>
#endif
 
#if defined(Q_WS_WIN)
#if defined(Q_OS_WIN)
#define XLocaleType _locale_t
#else
#if defined (Q_OS_SOLARIS) || defined (Q_OS_OPENBSD) || defined(Q_OS_FREEBSD) || defined(Q_OS_HAIKU)