Subversion Repositories Scribus

Rev

Rev 9528 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
4430 cbradney 1
/*
2
For general Scribus (>=1.3.2) copyright and licensing information please refer
3
to the COPYING file provided with the program. Following this notice may exist
4
a copyright and/or license notice that predates the release of Scribus 1.3.2
5
for which a new license (GPL+exception) is in place.
6
*/
1641 cbradney 7
#include "prefs.h"
8521 cbradney 8
//#include "prefs.moc"
1641 cbradney 9
#include "scribusdoc.h"
10
#include "scribusstructs.h"
11
#include "units.h"
12
#include "langmgr.h"
13
#include "hysettings.h"
14
#include "cmsprefs.h"
15
#include "tabtools.h"
16
#include "undomanager.h"
17
#include "tabcheckdoc.h"
18
#include "tabpdfoptions.h"
19
#include "fontprefs.h"
20
#include "units.h"
21
#include "pagesize.h"
4122 cbradney 22
#include "pagestructs.h"
1641 cbradney 23
#include "docitemattrprefs.h"
2769 fschmid 24
#include "marginWidget.h"
2834 cbradney 25
#include "prefsmanager.h"
2873 cbradney 26
#include "polygonwidget.h"
27
#include "fontcombo.h"
28
#include "linecombo.h"
29
#include "arrowchooser.h"
2901 fschmid 30
#include "pagelayout.h"
3213 craig 31
#include "pluginmanager.h"
3207 craig 32
#include "pluginmanagerprefsgui.h"
7880 fschmid 33
#include "prefsfile.h"
3213 craig 34
#include "scplugin.h"
3560 fschmid 35
#include "sccombobox.h"
4689 mrdocs 36
#include "colorcombo.h"
4546 subik 37
#include "commonstrings.h"
5342 cbradney 38
#include "scribusapp.h"
5243 cbradney 39
#include "scribuscore.h"
5326 cbradney 40
#include "tabtypography.h"
41
#include "tabguides.h"
42
#include "tabexternaltoolswidget.h"
5352 cbradney 43
#include "tabkeyboardshortcutswidget.h"
5326 cbradney 44
#include "tocindexprefs.h"
5507 subik 45
#include "hyphenator.h"
5851 subik 46
#include "tabgeneral.h"
47
#include "tabdisplay.h"
48
#include "tabdocument.h"
49
#include "tabmiscellaneous.h"
50
#include "tabscrapbook.h"
7109 fschmid 51
#include "tabprinter.h"
8501 cbradney 52
//Added by qt3to4:
53
#include <QPixmap>
54
#include <Q3ValueList>
55
#include <Q3CString>
3213 craig 56
 
1641 cbradney 57
using namespace std;
58
 
59
extern QPixmap loadIcon(QString nam);
5342 cbradney 60
extern ScribusQApp* ScQApp;
1641 cbradney 61
 
2834 cbradney 62
Preferences::Preferences( QWidget* parent) : PrefsDialogBase( parent )
1641 cbradney 63
{
2834 cbradney 64
        prefsManager=PrefsManager::instance();
65
        ApplicationPrefs* prefsData=&(prefsManager->appPrefs);
4026 craig 66
        ap = (ScribusMainWindow*)parent;
1641 cbradney 67
        docUnitIndex = prefsData->docUnitIndex;
1790 cbradney 68
        unitRatio = unitGetRatioFromIndex(docUnitIndex);
1641 cbradney 69
 
70
        setCaption( tr( "Preferences" ) );
71
 
5851 subik 72
        tabGeneral = new TabGeneral( prefsWidgets, "tabGeneral" );
5507 subik 73
        addItem( tr("General"), loadIcon("scribusicon.png"), tabGeneral);
1641 cbradney 74
 
5851 subik 75
        tabDocument = new TabDocument( prefsWidgets, "tabDocument" );
5507 subik 76
        addItem( tr("Document"), loadIcon("scribusdoc.png"), tabDocument);
1641 cbradney 77
 
2889 cbradney 78
        tabGuides = new TabGuides(prefsWidgets, &prefsData->guidesSettings, &prefsData->typographicSettings, docUnitIndex);
1641 cbradney 79
        addItem( tr("Guides"), loadIcon("guides.png"), tabGuides);
5763 subik 80
 
2889 cbradney 81
        tabTypo = new TabTypograpy(  prefsWidgets, &prefsData->typographicSettings);
3504 avox 82
        addItem( tr("Typography"), loadIcon("typography.png"), tabTypo);
5763 subik 83
 
5898 subik 84
        tabTools = new TabTools(prefsWidgets, &prefsData->toolSettings, docUnitIndex, ap->doc);
1641 cbradney 85
        addItem( tr("Tools"), loadIcon("tools.png"), tabTools);
86
 
87
        tabHyphenator = new HySettings(prefsWidgets, &ap->LangTransl);
88
        addItem( tr("Hyphenator"), loadIcon("hyphenate.png"), tabHyphenator);
89
 
5890 subik 90
        tabFonts = new FontPrefs(prefsWidgets, false, prefsManager->preferencesLocation(), ap->doc);
1641 cbradney 91
        addItem( tr("Fonts"), loadIcon("font.png"), tabFonts);
7109 fschmid 92
 
93
        tabPrinter = new TabPrinter(prefsWidgets, "tabPrinter");
94
        addItem( tr("Printer"), loadIcon("printer.png"), tabPrinter);
1641 cbradney 95
 
96
        tabDocChecker = new TabCheckDoc(  prefsWidgets, prefsData->checkerProfiles, prefsData->curCheckProfile);
2770 cbradney 97
        addItem( tr("Preflight Verifier"), loadIcon("checkdoc.png"), tabDocChecker);
1641 cbradney 98
 
5880 jghali 99
        if (ScCore->haveCMS())
1641 cbradney 100
        {
5243 cbradney 101
                tabColorManagement = new CMSPrefs(prefsWidgets, &prefsData->DCMSset, &ScCore->InputProfiles, &ScCore->InputProfilesCMYK, &ScCore->PrinterProfiles, &ScCore->MonitorProfiles);
1641 cbradney 102
                addItem( tr("Color Management"), loadIcon("blend.png"), tabColorManagement);
103
        }
5763 subik 104
 
5387 avox 105
        QMap<QString, int> DocFonts;
1641 cbradney 106
        DocFonts.clear();
107
        tabPDF = new TabPDFOptions( prefsWidgets,
4260 craig 108
                                                                prefsData->PDF_Options,
2834 cbradney 109
                                                                prefsData->AvailFonts,
5243 cbradney 110
                                                                ScCore->PDFXProfiles,
1641 cbradney 111
                                                                DocFonts,
112
                                                                prefsData->PDF_Options.PresentVals,
1790 cbradney 113
                                                                docUnitIndex,
1641 cbradney 114
                                                                prefsData->PageHeight,
115
                                                                prefsData->PageWidth,
116
 
9532 cbradney 117
        addItem( tr("PDF Export"), loadIcon("acroread32.png"), tabPDF);
1644 cbradney 118
 
1641 cbradney 119
        tabDefaultItemAttributes = new DocumentItemAttributes( prefsWidgets);
5851 subik 120
        QStringList defaultAttributesList=tabDefaultItemAttributes->getDocAttributesNames();
1641 cbradney 121
        tabDefaultItemAttributes->setup(&prefsData->defaultItemAttributes);
122
        addItem( tr("Document Item Attributes"), loadIcon("docattributes.png"), tabDefaultItemAttributes);
1701 cbradney 123
 
124
        tabDefaultTOCIndexPrefs = new TOCIndexPrefs( prefsWidgets );
125
        tabDefaultTOCIndexPrefs->setupItemAttrs( defaultAttributesList );
126
        tabDefaultTOCIndexPrefs->setup(&prefsData->defaultToCSetups, NULL);
127
        addItem( tr("Table of Contents and Indexes"), loadIcon("tabtocindex.png"), tabDefaultTOCIndexPrefs);
2784 subik 128
 
5352 cbradney 129
        tabKeyboardShortcuts = new TabKeyboardShortcutsWidget(prefsData->KeyActions, prefsWidgets);
5356 cbradney 130
        addItem( tr("Keyboard Shortcuts"), loadIcon("key_bindings.png"), tabKeyboardShortcuts);
5763 subik 131
 
5851 subik 132
        tabScrapbook = new TabScrapbook( prefsWidgets, "tabScrapbook" );
133
        addItem(  tr("Scrapbook"), loadIcon("scrap.png"), tabScrapbook);
5787 fschmid 134
 
5851 subik 135
        tabView = new TabDisplay(prefsWidgets, "tabView");
1641 cbradney 136
        addItem( tr("Display"), loadIcon("screen.png"), tabView);
5763 subik 137
 
5326 cbradney 138
        tabExtTools = new TabExternalToolsWidget( prefsData, prefsWidgets );
139
        addItem(  tr("External Tools"), loadIcon("externaltools.png"), tabExtTools);
5763 subik 140
 
5851 subik 141
        tabMiscellaneous = new TabMiscellaneous( prefsWidgets, "tabMiscellaneous" );
5507 subik 142
        addItem(  tr("Miscellaneous"), loadIcon("misc.png"), tabMiscellaneous);
5851 subik 143
 
1641 cbradney 144
        // plugin manager. pv.
5556 subik 145
        pluginManagerPrefsGui = new PluginManagerPrefsGui(prefsWidgets);
3213 craig 146
        addItem( tr("Plugins"), loadIcon("plugins.png"), pluginManagerPrefsGui );
5851 subik 147
 
5711 subik 148
        setupGui();
3213 craig 149
        addPlugins();
150
 
2901 fschmid 151
        setDS(prefsData->FacingPages);
1641 cbradney 152
 
153
        resize( minimumSizeHint() );
154
        arrangeIcons();
1834 fschmid 155
        prefsSelection->setSelected(prefsSelection->firstItem(), true);
156
        itemSelected(prefsSelection->firstItem());
1641 cbradney 157
}
158
 
5763 subik 159
void Preferences::enableSignals(bool on)
160
{
161
        if (on)
162
        {
5851 subik 163
                connect(tabDocument->unitCombo, SIGNAL(activated(int)), this, SLOT(unitChange()));
164
                connect(tabDocument->docLayout, SIGNAL( selectedLayout(int) ), this, SLOT( setDS(int) ) );
5763 subik 165
                connect(buttonOk, SIGNAL(clicked()), this, SLOT(setActionHistoryLength()));
5880 jghali 166
                if (ScCore->haveCMS())
5763 subik 167
                        connect(tabColorManagement, SIGNAL(cmsOn(bool )), this, SLOT(switchCMS(bool )));
168
                connect(applyChangesButton, SIGNAL(clicked()), this, SLOT(applyChangesButton_clicked()));
169
                connect(backToDefaults, SIGNAL(clicked()), this, SLOT(backToDefaults_clicked()));
5851 subik 170
                connect( prefsWidgets, SIGNAL(aboutToShow(QWidget *)), this, SLOT(showWidgetInStack(QWidget *)));
171
                connect(this, SIGNAL(accepted()), pluginManagerPrefsGui, SLOT(apply()));
5763 subik 172
        }
173
        else
174
        {
5851 subik 175
                disconnect(tabDocument->unitCombo, SIGNAL(activated(int)), this, SLOT(unitChange()));
176
                disconnect(tabDocument->docLayout, SIGNAL( selectedLayout(int) ), this, SLOT( setDS(int) ) );
5763 subik 177
                disconnect(buttonOk, SIGNAL(clicked()), this, SLOT(setActionHistoryLength()));
5880 jghali 178
                if (ScCore->haveCMS())
5763 subik 179
                        disconnect(tabColorManagement, SIGNAL(cmsOn(bool )), this, SLOT(switchCMS(bool )));
180
                disconnect(applyChangesButton, SIGNAL(clicked()), this, SLOT(applyChangesButton_clicked()));
181
                disconnect(backToDefaults, SIGNAL(clicked()), this, SLOT(backToDefaults_clicked()));
5851 subik 182
                disconnect( prefsWidgets, SIGNAL(aboutToShow(QWidget *)), this, SLOT(showWidgetInStack(QWidget *)));
183
                disconnect(this, SIGNAL(accepted()), pluginManagerPrefsGui, SLOT(apply()));
5763 subik 184
        }
185
}
186
 
5507 subik 187
void Preferences::restoreDefaults()
188
{
189
        prefsManager->initDefaults();
5562 subik 190
        setupGui();
191
}
192
 
193
void Preferences::setupGui()
194
{
5763 subik 195
        enableSignals(false);
5507 subik 196
        ApplicationPrefs* prefsData=&(prefsManager->appPrefs);
197
 
5851 subik 198
        tabGeneral->restoreDefaults(prefsData);
199
        tabDocument->restoreDefaults(prefsData);
7109 fschmid 200
        tabPrinter->restoreDefaults(prefsData);
8012 cbradney 201
        tabView->restoreDefaults(prefsData, prefsData->guidesSettings, prefsData->pageSets, prefsData->FacingPages, prefsData->scratch);
5851 subik 202
        tabScrapbook->restoreDefaults(prefsData);
203
        tabHyphenator->restoreDefaults(prefsData);
5562 subik 204
        tabGuides->restoreDefaults(&prefsData->guidesSettings, &prefsData->typographicSettings, docUnitIndex);
205
        tabTypo->restoreDefaults(&prefsData->typographicSettings);
5851 subik 206
        tabTools->restoreDefaults(&prefsData->toolSettings, docUnitIndex);
207
        // main performance issue in availFonts->GetFonts(HomeP)!
208
        // no prefsData here
5562 subik 209
        tabFonts->restoreDefaults();
210
        tabDocChecker->restoreDefaults(&prefsData->checkerProfiles, prefsData->curCheckProfile);
5851 subik 211
 
5562 subik 212
        QMap<QString, int> DocFonts;
213
        DocFonts.clear();
214
        tabPDF->restoreDefaults(prefsData->PDF_Options,
215
                                                        prefsData->AvailFonts,
216
                                                        ScCore->PDFXProfiles,
217
                                                        DocFonts,
218
                                                        prefsData->PDF_Options.PresentVals,
219
                                                        docUnitIndex,
220
                                                        prefsData->PageHeight,
221
                                                        prefsData->PageWidth,
5880 jghali 222
                                                        0, false);
5851 subik 223
 
9528 avox 224
        if (ScCore->haveCMS())
225
                tabColorManagement->restoreDefaults(&prefsData->DCMSset, &ScCore->InputProfiles,
5711 subik 226
                                                                                 &ScCore->InputProfilesCMYK,
227
                                                                                 &ScCore->PrinterProfiles, &ScCore->MonitorProfiles);
5851 subik 228
        QStringList defaultAttributesList=tabDefaultItemAttributes->getDocAttributesNames();
5562 subik 229
        tabDefaultItemAttributes->setup(&prefsData->defaultItemAttributes);
230
        tabDefaultTOCIndexPrefs->setupItemAttrs( defaultAttributesList );
231
        tabDefaultTOCIndexPrefs->setup(&prefsData->defaultToCSetups, NULL);
232
        tabKeyboardShortcuts->restoreDefaults();
233
        tabExtTools->restoreDefaults(prefsData);
5851 subik 234
        tabMiscellaneous->restoreDefaults(prefsData);
5763 subik 235
        enableSignals(true);
236
        unitChange();
5507 subik 237
}
238
 
3213 craig 239
void Preferences::addPlugins()
240
{
241
        // Scan for plugins that provide a prefs widget, and add it to the
242
        // prefs dialog.
3383 craig 243
        // For each plugin, enabled or not:
7176 subik 244
        ScPlugin* plugin = 0;
245
        PrefsPanel* panel = 0;
246
        QString panelCaption;
247
        QPixmap panelIcon;
248
 
3213 craig 249
        PluginManager& pluginManager = PluginManager::instance();
8618 subik 250
        QStringList pluginNames(pluginManager.pluginNames(true));
7176 subik 251
 
8618 subik 252
        foreach (QString pName, pluginManager.pluginNames(true))
3213 craig 253
        {
3214 craig 254
                // Ask the plugin manager for a plugin (skipping disabled plugins).
8618 subik 255
                plugin = pluginManager.getPlugin(pName, false);
3214 craig 256
                // If we got a plugin (which we know is enabled):
257
                if (plugin)
3213 craig 258
                {
3214 craig 259
                        // Ask the plugin for a prefs widget
260
                        bool wantPanel = plugin->newPrefsPanelWidget(
261
                                        prefsWidgets, panel, panelCaption, panelIcon);
262
                        // If it gave us one...
263
                        if (wantPanel)
264
                        {
265
                                // Ensure that we got sane return values
266
                                Q_ASSERT(panel);
267
                                Q_ASSERT(!panelIcon.isNull());
268
                                Q_ASSERT(!panelCaption.isNull());
269
                                // plug it in to the dialog,
270
                                addItem(panelCaption, panelIcon, panel);
271
                                // and connect a signal to tell it to save its
272
                                // settings.
273
                                connect(this, SIGNAL(accepted()), panel, SLOT(apply()));
274
                        }
3213 craig 275
                }
276
        }
277
}
278
 
279
void Preferences::accept()
280
{
281
        emit accepted();
282
        return PrefsDialogBase::accept();
283
}
284
 
2901 fschmid 285
void Preferences::setDS(int layout)
1641 cbradney 286
{
5851 subik 287
        tabDocument->marginGroup->setFacingPages(!(layout == singlePage));
288
        tabDocument->choosenLayout = layout;
289
        tabDocument->docLayout->firstPage->setCurrentItem(prefsManager->appPrefs.pageSets[tabDocument->choosenLayout].FirstPage);
290
        tabView->gapHorizontal->setValue(prefsManager->appPrefs.pageSets[tabDocument->choosenLayout].GapHorizontal * unitRatio);
291
        tabView->gapVertical->setValue(prefsManager->appPrefs.pageSets[tabDocument->choosenLayout].GapVertical * unitRatio);
1641 cbradney 292
}
293
 
294
void Preferences::unitChange()
295
{
1790 cbradney 296
        double oldUnitRatio = unitRatio;
5851 subik 297
        docUnitIndex = tabDocument->unitCombo->currentItem();
1790 cbradney 298
        unitRatio = unitGetRatioFromIndex(docUnitIndex);
9092 cbradney 299
        int decimals = unitGetPrecisionFromIndex(docUnitIndex);
5851 subik 300
        QString suffix = unitGetSuffixFromIndex(docUnitIndex);
1790 cbradney 301
        double invUnitConversion = 1.0 / oldUnitRatio * unitRatio;
5851 subik 302
 
5876 subik 303
        tabDocument->unitChange();
5851 subik 304
        tabGuides->unitChange(suffix, docUnitIndex, decimals, invUnitConversion);
305
        tabView->unitChange(suffix, docUnitIndex, decimals, invUnitConversion);
306
        tabTools->unitChange(suffix, docUnitIndex, decimals, invUnitConversion);
307
        tabPDF->unitChange(suffix, docUnitIndex, decimals, invUnitConversion);
7109 fschmid 308
        tabPrinter->unitChange(suffix, docUnitIndex, decimals, invUnitConversion);
1641 cbradney 309
}
310
 
311
 
312
void Preferences::setActionHistoryLength()
313
{
7880 fschmid 314
        PrefsContext *undoPrefs = PrefsManager::instance()->prefsFile->getContext("undo");
315
        bool isEnabled = tabDocument->urGroup->isChecked();
316
        if (!isEnabled)
317
                UndoManager::instance()->clearStack();
318
        UndoManager::instance()->setUndoEnabled(isEnabled);
319
        undoPrefs->set("enabled", isEnabled);
320
        UndoManager::instance()->setAllHistoryLengths(tabDocument->urSpinBox->value());
1641 cbradney 321
}
322
 
323
void Preferences::switchCMS(bool enable)
324
{
325
        tabPDF->enableCMS(enable);
326
}
327
 
5851 subik 328
void Preferences::showWidgetInStack(QWidget *widgetToShow)
1701 cbradney 329
{
2784 subik 330
        //Update the attributes list in TOC setup
1701 cbradney 331
        if (widgetToShow==tabDefaultTOCIndexPrefs)
332
                tabDefaultTOCIndexPrefs->setupItemAttrs( tabDefaultItemAttributes->getDocAttributesNames() );
5851 subik 333
        if (widgetToShow == tabTools)
334
                tabTools->enableFontPreview(true);
1701 cbradney 335
}
2873 cbradney 336
 
337
void Preferences::updatePreferences()
338
{
5851 subik 339
        double prefsUnitRatio = unitGetRatioFromIndex(tabDocument->unitCombo->currentItem());
340
 
341
        prefsManager->appPrefs.AppFontSize = tabGeneral->GFsize->value();
342
        prefsManager->appPrefs.PaletteFontSize = tabGeneral->GTFsize->value();
6338 cbradney 343
        ScQApp->neverSplash(!tabGeneral->showSplashCheckBox->isChecked());
344
        prefsManager->appPrefs.showStartupDialog = tabGeneral->startUpDialog->isChecked();
5851 subik 345
        prefsManager->appPrefs.Wheelval = tabGeneral->wheelJumpSpin->value();
5912 fschmid 346
        prefsManager->appPrefs.moveTimeout = tabGeneral->spinTimeout->value();
5851 subik 347
        prefsManager->appPrefs.RecentDCount = tabGeneral->recentDocs->value();
7117 jghali 348
        prefsManager->appPrefs.DocDir = ScPaths::separatorsToSlashes( tabGeneral->Docs->text() );
349
        prefsManager->appPrefs.ProfileDir = ScPaths::separatorsToSlashes( tabGeneral->ProPfad->text() );
350
        prefsManager->appPrefs.ScriptDir = ScPaths::separatorsToSlashes( tabGeneral->ScriptPfad->text() );
351
        prefsManager->appPrefs.documentTemplatesDir = ScPaths::separatorsToSlashes( tabGeneral->DocumentTemplateDir->text() );
5851 subik 352
        prefsManager->appPrefs.guiLanguage=tabGeneral->selectedGUILang;
353
        prefsManager->appPrefs.GUI = tabGeneral->GUICombo->currentText();
354
 
355
        prefsManager->appPrefs.pageSets[tabDocument->choosenLayout].GapHorizontal = tabView->gapHorizontal->value() / prefsUnitRatio;
356
        prefsManager->appPrefs.pageSets[tabDocument->choosenLayout].GapVertical = tabView->gapVertical->value() / prefsUnitRatio;
357
        prefsManager->appPrefs.marginColored = tabView->checkUnprintable->isChecked();
8012 cbradney 358
        prefsManager->appPrefs.scratch.Bottom = tabView->bottomScratch->value() / prefsUnitRatio;
359
        prefsManager->appPrefs.scratch.Left = tabView->leftScratch->value() / prefsUnitRatio;
360
        prefsManager->appPrefs.scratch.Right = tabView->rightScratch->value() / prefsUnitRatio;
361
        prefsManager->appPrefs.scratch.Top = tabView->topScratch->value() / prefsUnitRatio;
6337 cbradney 362
        // GUI colors
5851 subik 363
        prefsManager->appPrefs.DpapColor = tabView->colorPaper;
6337 cbradney 364
        prefsManager->appPrefs.DFrameColor = tabView->colorFrame;
365
        prefsManager->appPrefs.DFrameNormColor = tabView->colorFrameNorm;
366
        prefsManager->appPrefs.DFrameGroupColor = tabView->colorFrameGroup;
367
        prefsManager->appPrefs.DFrameLockColor = tabView->colorFrameLocked;
368
        prefsManager->appPrefs.DFrameLinkColor = tabView->colorFrameLinked;
369
        prefsManager->appPrefs.DFrameAnnotationColor = tabView->colorFrameAnnotation;
370
        prefsManager->appPrefs.DPageBorderColor = tabView->colorPageBorder;
371
        prefsManager->appPrefs.DControlCharColor = tabView->colorControlChars;
372
        // Guides
373
 
5851 subik 374
        prefsManager->appPrefs.guidesSettings.framesShown = tabView->checkFrame->isChecked();
7051 fschmid 375
        prefsManager->appPrefs.guidesSettings.showBleed = tabView->checkBleed->isChecked();
5851 subik 376
        prefsManager->appPrefs.guidesSettings.layerMarkersShown = tabView->checkLayerM->isChecked();
377
        prefsManager->appPrefs.guidesSettings.rulerMode = tabView->checkRuler->isChecked();
378
        prefsManager->appPrefs.guidesSettings.showPic = tabView->checkPictures->isChecked();
379
        prefsManager->appPrefs.guidesSettings.linkShown = tabView->checkLink->isChecked();
380
        prefsManager->appPrefs.guidesSettings.showControls = tabView->checkControl->isChecked();
381
        prefsManager->appPrefs.DisScale = tabView->DisScale;
382
 
383
        prefsManager->appPrefs.doCopyToScrapbook = tabScrapbook->useScrapBookasExtension->isChecked();
384
        prefsManager->appPrefs.persistentScrapbook = tabScrapbook->persistentScrapbook->isChecked();
385
        prefsManager->appPrefs.numScrapbookCopies = tabScrapbook->numScrapCopies->value();
386
 
2873 cbradney 387
        tabTools->polyWidget->getValues(&prefsManager->appPrefs.toolSettings.polyC, &prefsManager->appPrefs.toolSettings.polyFd, &prefsManager->appPrefs.toolSettings.polyF, &prefsManager->appPrefs.toolSettings.polyS, &prefsManager->appPrefs.toolSettings.polyR);
5851 subik 388
 
389
        prefsManager->appPrefs.pageSize = tabDocument->prefsPageSizeName;
390
        prefsManager->appPrefs.pageOrientation = tabDocument->pageOrientationComboBox->currentItem();
5876 subik 391
        prefsManager->appPrefs.PageWidth = tabDocument->pageW;
392
        prefsManager->appPrefs.PageHeight = tabDocument->pageH;
5851 subik 393
 
7225 cbradney 394
        prefsManager->appPrefs.margins.Top = tabDocument->marginGroup->top();
395
        prefsManager->appPrefs.margins.Bottom = tabDocument->marginGroup->bottom();
396
        prefsManager->appPrefs.margins.Left = tabDocument->marginGroup->left();
397
        prefsManager->appPrefs.margins.Right = tabDocument->marginGroup->right();
5851 subik 398
        prefsManager->appPrefs.FacingPages  = tabDocument->choosenLayout;
7225 cbradney 399
        prefsManager->appPrefs.bleeds.Bottom = tabDocument->marginGroup->bottomBleed();
400
        prefsManager->appPrefs.bleeds.Top = tabDocument->marginGroup->topBleed();
401
        prefsManager->appPrefs.bleeds.Left = tabDocument->marginGroup->leftBleed();
402
        prefsManager->appPrefs.bleeds.Right = tabDocument->marginGroup->rightBleed();
5851 subik 403
        prefsManager->appPrefs.pageSets[tabDocument->choosenLayout].FirstPage = tabDocument->docLayout->firstPage->currentItem();
404
 
5326 cbradney 405
        prefsManager->setImageEditorExecutable(tabExtTools->newImageTool());
5418 cbradney 406
        prefsManager->setExtBrowserExecutable(tabExtTools->newExtBrowserTool());
5326 cbradney 407
        prefsManager->appPrefs.gs_AntiAliasGraphics = tabExtTools->newAntialiasGraphics();
408
        prefsManager->appPrefs.gs_AntiAliasText = tabExtTools->newAntialiasText();
409
        prefsManager->setGhostscriptExecutable(tabExtTools->newPSTool());
410
        prefsManager->appPrefs.gs_Resolution = tabExtTools->newPSToolResolution();
5851 subik 411
 
2873 cbradney 412
        prefsManager->appPrefs.guidesSettings.before = tabGuides->inBackground->isChecked();
5851 subik 413
 
414
        prefsManager->appPrefs.askBeforeSubstituite = tabMiscellaneous->AskForSubs->isChecked();
415
        prefsManager->appPrefs.haveStylePreview = tabMiscellaneous->stylePreview->isChecked();
2873 cbradney 416
        // lorem ipsum
5851 subik 417
        prefsManager->appPrefs.useStandardLI = tabMiscellaneous->useStandardLI->isChecked();
418
        prefsManager->appPrefs.paragraphsLI = tabMiscellaneous->paragraphsLI->value();
3849 subik 419
 
5851 subik 420
        prefsManager->appPrefs.docUnitIndex = tabDocument->unitCombo->currentItem();
421
 
2873 cbradney 422
        prefsManager->appPrefs.toolSettings.defFont = tabTools->fontComboText->currentText();
423
        prefsManager->appPrefs.toolSettings.defSize = tabTools->sizeComboText->currentText().left(2).toInt() * 10;
5851 subik 424
 
2873 cbradney 425
        prefsManager->appPrefs.guidesSettings.marginsShown = tabGuides->marginBox->isChecked();
426
        prefsManager->appPrefs.guidesSettings.gridShown = tabGuides->checkGrid->isChecked();
427
        prefsManager->appPrefs.guidesSettings.guidesShown = tabGuides->guideBox->isChecked();
428
        prefsManager->appPrefs.guidesSettings.baseShown = tabGuides->baselineBox->isChecked();
429
        prefsManager->appPrefs.guidesSettings.grabRad = tabGuides->grabDistance->value();
7417 fschmid 430
        prefsManager->appPrefs.guidesSettings.guideRad = tabGuides->snapDistance->value();
2873 cbradney 431
        prefsManager->appPrefs.guidesSettings.minorGrid = tabGuides->minorSpace->value() / prefsUnitRatio;
432
        prefsManager->appPrefs.guidesSettings.majorGrid = tabGuides->majorSpace->value() / prefsUnitRatio;
433
        prefsManager->appPrefs.guidesSettings.minorColor = tabGuides->colorMinorGrid;
434
        prefsManager->appPrefs.guidesSettings.majorColor = tabGuides->colorMajorGrid;
435
        prefsManager->appPrefs.guidesSettings.margColor = tabGuides->colorMargin;
436
        prefsManager->appPrefs.guidesSettings.guideColor = tabGuides->colorGuides;
437
        prefsManager->appPrefs.guidesSettings.baseColor = tabGuides->colorBaselineGrid;
438
        prefsManager->appPrefs.checkerProfiles = tabDocChecker->checkerProfile;
439
        prefsManager->appPrefs.curCheckProfile = tabDocChecker->curCheckProfile->currentText();
2889 cbradney 440
        prefsManager->appPrefs.typographicSettings.valueSuperScript = tabTypo->superDisplacement->value();
441
        prefsManager->appPrefs.typographicSettings.scalingSuperScript = tabTypo->superScaling->value();
442
        prefsManager->appPrefs.typographicSettings.valueSubScript = tabTypo->subDisplacement->value();
443
        prefsManager->appPrefs.typographicSettings.scalingSubScript = tabTypo->subScaling->value();
444
        prefsManager->appPrefs.typographicSettings.valueSmallCaps = tabTypo->capsScaling->value();
445
        prefsManager->appPrefs.typographicSettings.autoLineSpacing = tabTypo->autoLine->value();
446
        prefsManager->appPrefs.typographicSettings.valueBaseGrid = tabGuides->baseGrid->value() / prefsUnitRatio;
447
        prefsManager->appPrefs.typographicSettings.offsetBaseGrid = tabGuides->baseOffset->value() / prefsUnitRatio;
448
        prefsManager->appPrefs.typographicSettings.valueUnderlinePos = qRound(tabTypo->underlinePos->value() * 10);
449
        prefsManager->appPrefs.typographicSettings.valueUnderlineWidth = qRound(tabTypo->underlineWidth->value() * 10);
450
        prefsManager->appPrefs.typographicSettings.valueStrikeThruPos = qRound(tabTypo->strikethruPos->value() * 10);
451
        prefsManager->appPrefs.typographicSettings.valueStrikeThruWidth = qRound(tabTypo->strikethruWidth->value() * 10);
3093 fschmid 452
        prefsManager->appPrefs.toolSettings.dTextBackGround = tabTools->colorComboTextBackground->currentText();
8439 cbradney 453
        if (prefsManager->appPrefs.toolSettings.dTextBackGround == CommonStrings::tr_NoneColor)
4546 subik 454
                prefsManager->appPrefs.toolSettings.dTextBackGround = CommonStrings::None;
3093 fschmid 455
        prefsManager->appPrefs.toolSettings.dTextLineColor = tabTools->colorComboTextLine->currentText();
8439 cbradney 456
        if (prefsManager->appPrefs.toolSettings.dTextLineColor == CommonStrings::tr_NoneColor)
4546 subik 457
                prefsManager->appPrefs.toolSettings.dTextLineColor = CommonStrings::None;
3093 fschmid 458
        prefsManager->appPrefs.toolSettings.dTextBackGroundShade = tabTools->shadingTextBack->value();
459
        prefsManager->appPrefs.toolSettings.dTextLineShade = tabTools->shadingTextLine->value();
460
        prefsManager->appPrefs.toolSettings.dTextPenShade = tabTools->shadingText->value();
461
        prefsManager->appPrefs.toolSettings.dTextStrokeShade = tabTools->shadingTextStroke->value();
2873 cbradney 462
        prefsManager->appPrefs.toolSettings.dPen = tabTools->colorComboLineShape->currentText();
8439 cbradney 463
        if (prefsManager->appPrefs.toolSettings.dPen == CommonStrings::tr_NoneColor)
4546 subik 464
                prefsManager->appPrefs.toolSettings.dPen = CommonStrings::None;
2873 cbradney 465
        prefsManager->appPrefs.toolSettings.dPenText = tabTools->colorComboText->currentText();
8439 cbradney 466
        if (prefsManager->appPrefs.toolSettings.dPenText == CommonStrings::tr_NoneColor)
4546 subik 467
                prefsManager->appPrefs.toolSettings.dPenText = CommonStrings::None;
2873 cbradney 468
        prefsManager->appPrefs.toolSettings.dStrokeText = tabTools->colorComboStrokeText->currentText();
8439 cbradney 469
        if (prefsManager->appPrefs.toolSettings.dStrokeText == CommonStrings::tr_NoneColor)
4546 subik 470
                prefsManager->appPrefs.toolSettings.dStrokeText = CommonStrings::None;
2873 cbradney 471
        prefsManager->appPrefs.toolSettings.dCols = tabTools->columnsText->value();
472
        prefsManager->appPrefs.toolSettings.dGap = tabTools->gapText->value() / prefsUnitRatio;
473
        prefsManager->appPrefs.toolSettings.dTabWidth = tabTools->gapTab->value() / prefsUnitRatio;
474
        prefsManager->appPrefs.toolSettings.dBrush = tabTools->comboFillShape->currentText();
8439 cbradney 475
        if (prefsManager->appPrefs.toolSettings.dBrush == CommonStrings::tr_NoneColor)
4546 subik 476
                prefsManager->appPrefs.toolSettings.dBrush = CommonStrings::None;
2873 cbradney 477
        prefsManager->appPrefs.toolSettings.dShade = tabTools->shadingFillShape->value();
478
        prefsManager->appPrefs.toolSettings.dShade2 = tabTools->shadingLineShape->value();
479
        switch (tabTools->tabFillCombo->currentItem())
480
        {
481
                case 0:
482
                        prefsManager->appPrefs.toolSettings.tabFillChar = "";
483
                        break;
484
                case 1:
485
                        prefsManager->appPrefs.toolSettings.tabFillChar = ".";
486
                        break;
487
                case 2:
488
                        prefsManager->appPrefs.toolSettings.tabFillChar = "-";
489
                        break;
490
                case 3:
491
                        prefsManager->appPrefs.toolSettings.tabFillChar = "_";
492
                        break;
493
                case 4:
494
                        prefsManager->appPrefs.toolSettings.tabFillChar = tabTools->tabFillCombo->currentText().right(1);
495
                        break;
496
        }
497
        switch (tabTools->comboStyleShape->currentItem())
498
        {
499
                case 0:
8522 cbradney 500
                        prefsManager->appPrefs.toolSettings.dLineArt = Qt::SolidLine;
2873 cbradney 501
                        break;
502
                case 1:
8522 cbradney 503
                        prefsManager->appPrefs.toolSettings.dLineArt = Qt::DashLine;
2873 cbradney 504
                        break;
505
                case 2:
8522 cbradney 506
                        prefsManager->appPrefs.toolSettings.dLineArt = Qt::DotLine;
2873 cbradney 507
                        break;
508
                case 3:
8522 cbradney 509
                        prefsManager->appPrefs.toolSettings.dLineArt = Qt::DashDotLine;
2873 cbradney 510
                        break;
511
                case 4:
8522 cbradney 512
                        prefsManager->appPrefs.toolSettings.dLineArt = Qt::DashDotDotLine;
2873 cbradney 513
                        break;
514
        }
515
        prefsManager->appPrefs.toolSettings.dWidth = tabTools->lineWidthShape->value();
516
        prefsManager->appPrefs.toolSettings.dPenLine = tabTools->colorComboLine->currentText();
8439 cbradney 517
        if (prefsManager->appPrefs.toolSettings.dPenLine == CommonStrings::tr_NoneColor)
4546 subik 518
                prefsManager->appPrefs.toolSettings.dPenLine = CommonStrings::None;
2873 cbradney 519
        prefsManager->appPrefs.toolSettings.dShadeLine = tabTools->shadingLine->value();
520
        switch (tabTools->comboStyleLine->currentItem())
521
        {
522
        case 0:
8522 cbradney 523
                prefsManager->appPrefs.toolSettings.dLstyleLine = Qt::SolidLine;
2873 cbradney 524
                break;
525
        case 1:
8522 cbradney 526
                prefsManager->appPrefs.toolSettings.dLstyleLine = Qt::DashLine;
2873 cbradney 527
                break;
528
        case 2:
8522 cbradney 529
                prefsManager->appPrefs.toolSettings.dLstyleLine = Qt::DotLine;
2873 cbradney 530
                break;
531
        case 3:
8522 cbradney 532
                prefsManager->appPrefs.toolSettings.dLstyleLine = Qt::DashDotLine;
2873 cbradney 533
                break;
534
        case 4:
8522 cbradney 535
                prefsManager->appPrefs.toolSettings.dLstyleLine = Qt::DashDotDotLine;
2873 cbradney 536
                break;
537
        }
538
        prefsManager->appPrefs.toolSettings.dWidthLine = tabTools->lineWidthLine->value();
539
        prefsManager->appPrefs.toolSettings.dStartArrow = tabTools->startArrow->currentItem();
540
        prefsManager->appPrefs.toolSettings.dEndArrow = tabTools->endArrow->currentItem();
541
        prefsManager->appPrefs.toolSettings.magMin = tabTools->minimumZoom->value();
542
        prefsManager->appPrefs.toolSettings.magMax = tabTools->maximumZoom->value();
543
        prefsManager->appPrefs.toolSettings.magStep = tabTools->zoomStep->value();
544
        prefsManager->appPrefs.toolSettings.dBrushPict = tabTools->comboFillImage->currentText();
8439 cbradney 545
        if (prefsManager->appPrefs.toolSettings.dBrushPict == CommonStrings::tr_NoneColor)
4546 subik 546
                prefsManager->appPrefs.toolSettings.dBrushPict = CommonStrings::None;
2873 cbradney 547
        prefsManager->appPrefs.toolSettings.shadePict = tabTools->shadingFillImage->value();
548
        prefsManager->appPrefs.toolSettings.scaleX = static_cast<double>(tabTools->scalingHorizontal->value()) / 100.0;
549
        prefsManager->appPrefs.toolSettings.scaleY = static_cast<double>(tabTools->scalingVertical->value()) / 100.0;
550
        prefsManager->appPrefs.toolSettings.scaleType = tabTools->buttonGroup3->isChecked();
551
        prefsManager->appPrefs.toolSettings.aspectRatio = tabTools->checkRatioImage->isChecked();
552
        prefsManager->appPrefs.toolSettings.useEmbeddedPath = tabTools->embeddedPath->isChecked();
553
        int haRes = 0;
554
        if (tabTools->checkFullRes->isChecked())
555
                haRes = 0;
556
        if (tabTools->checkNormalRes->isChecked())
557
                haRes = 1;
558
        if (tabTools->checkHalfRes->isChecked())
559
                haRes = 2;
560
        prefsManager->appPrefs.toolSettings.lowResType = haRes;
6606 fschmid 561
        prefsManager->appPrefs.toolSettings.dispX = tabTools->genDispX->value();
562
        prefsManager->appPrefs.toolSettings.dispY = tabTools->genDispY->value();
6618 fschmid 563
        prefsManager->appPrefs.toolSettings.constrain = tabTools->genRot->value();
5851 subik 564
        prefsManager->appPrefs.AutoSave = tabDocument->GroupAS->isChecked();
565
        prefsManager->appPrefs.AutoSaveTime = tabDocument->ASTime->value() * 60 * 1000;
2873 cbradney 566
        prefsManager->appPrefs.MinWordLen = tabHyphenator->wordLen->value();
5781 cbradney 567
        prefsManager->appPrefs.Language = ScCore->primaryMainWindow()->GetLang(tabHyphenator->language->currentText());
2873 cbradney 568
        prefsManager->appPrefs.Automatic = !tabHyphenator->verbose->isChecked();
569
        prefsManager->appPrefs.AutoCheck = tabHyphenator->input->isChecked();
570
        prefsManager->appPrefs.HyCount = tabHyphenator->maxCount->value();
5880 jghali 571
        if (ScCore->haveCMS())
2873 cbradney 572
                tabColorManagement->setValues();
573
        uint a = 0;
574
        SCFontsIterator it(prefsManager->appPrefs.AvailFonts);
5980 avox 575
        for ( ; it.hasNext() ; it.next())
2873 cbradney 576
        {
5980 avox 577
                it.current().embedPs(tabFonts->fontFlags[it.currentKey()].FlagPS);
578
                it.current().usable(tabFonts->fontFlags[it.currentKey()].FlagUse);
579
                it.current().subset(tabFonts->fontFlags[it.currentKey()].FlagSub);
2873 cbradney 580
        }
581
        a = 0;
582
        QMap<QString,QString>::Iterator itfsuend=tabFonts->RList.end();
583
        prefsManager->appPrefs.GFontSub.clear();
584
        for (QMap<QString,QString>::Iterator itfsu = tabFonts->RList.begin(); itfsu != itfsuend; ++itfsu)
585
                prefsManager->appPrefs.GFontSub[itfsu.key()] = tabFonts->FlagsRepl.at(a++)->currentText();
586
        prefsManager->appPrefs.PDF_Options.Thumbnails = tabPDF->CheckBox1->isChecked();
587
        prefsManager->appPrefs.PDF_Options.Compress = tabPDF->Compression->isChecked();
588
        prefsManager->appPrefs.PDF_Options.CompressMethod = tabPDF->CMethod->currentItem();
589
        prefsManager->appPrefs.PDF_Options.Quality = tabPDF->CQuality->currentItem();
590
        prefsManager->appPrefs.PDF_Options.Resolution = tabPDF->Resolution->value();
591
        prefsManager->appPrefs.PDF_Options.RecalcPic = tabPDF->DSColor->isChecked();
592
        prefsManager->appPrefs.PDF_Options.PicRes = tabPDF->ValC->value();
593
        prefsManager->appPrefs.PDF_Options.Bookmarks = tabPDF->CheckBM->isChecked();
594
        prefsManager->appPrefs.PDF_Options.Binding = tabPDF->ComboBind->currentItem();
595
        prefsManager->appPrefs.PDF_Options.MirrorH = tabPDF->MirrorH->isOn();
596
        prefsManager->appPrefs.PDF_Options.MirrorV = tabPDF->MirrorV->isOn();
597
        prefsManager->appPrefs.PDF_Options.RotateDeg = tabPDF->RotateDeg->currentItem() * 90;
598
        prefsManager->appPrefs.PDF_Options.Articles = tabPDF->Article->isChecked();
599
        prefsManager->appPrefs.PDF_Options.Encrypt = tabPDF->Encry->isChecked();
600
        prefsManager->appPrefs.PDF_Options.UseLPI = tabPDF->UseLPI->isChecked();
5320 fschmid 601
        prefsManager->appPrefs.PDF_Options.UseSpotColors = tabPDF->overprintMode->isChecked();
602
        prefsManager->appPrefs.PDF_Options.doOverprint = !tabPDF->useSpot->isChecked();
3079 fschmid 603
        prefsManager->appPrefs.PDF_Options.doMultiFile = false;
7225 cbradney 604
        prefsManager->appPrefs.PDF_Options.bleeds.Bottom = tabPDF->BleedBottom->value() / prefsUnitRatio;
605
        prefsManager->appPrefs.PDF_Options.bleeds.Top = tabPDF->BleedTop->value() / prefsUnitRatio;
606
        prefsManager->appPrefs.PDF_Options.bleeds.Left = tabPDF->BleedLeft->value() / prefsUnitRatio;
607
        prefsManager->appPrefs.PDF_Options.bleeds.Right = tabPDF->BleedRight->value() / prefsUnitRatio;
4649 fschmid 608
        prefsManager->appPrefs.PDF_Options.doClip = tabPDF->ClipMarg->isChecked();
2873 cbradney 609
        if (tabPDF->Encry->isChecked())
610
        {
611
                int Perm = -64;
612
                if (tabPDF->PDFVersionCombo->currentItem() == 1)
613
                        Perm &= ~0x00240000;
614
                if (tabPDF->PrintSec->isChecked())
615
                        Perm += 4;
616
                if (tabPDF->ModifySec->isChecked())
617
                        Perm += 8;
618
                if (tabPDF->CopySec->isChecked())
619
                        Perm += 16;
620
                if (tabPDF->AddSec->isChecked())
621
                        Perm += 32;
622
                prefsManager->appPrefs.PDF_Options.Permissions = Perm;
623
                prefsManager->appPrefs.PDF_Options.PassOwner = tabPDF->PassOwner->text();
624
                prefsManager->appPrefs.PDF_Options.PassUser = tabPDF->PassUser->text();
625
        }
626
        if (tabPDF->PDFVersionCombo->currentItem() == 0)
627
                prefsManager->appPrefs.PDF_Options.Version = PDFOptions::PDFVersion_13;
628
        if (tabPDF->PDFVersionCombo->currentItem() == 1)
629
                prefsManager->appPrefs.PDF_Options.Version = PDFOptions::PDFVersion_14;
630
        if (tabPDF->PDFVersionCombo->currentItem() == 2)
631
                prefsManager->appPrefs.PDF_Options.Version = PDFOptions::PDFVersion_15;
632
        if (tabPDF->PDFVersionCombo->currentItem() == 3)
633
                prefsManager->appPrefs.PDF_Options.Version = PDFOptions::PDFVersion_X3;
634
        if (tabPDF->OutCombo->currentItem() == 0)
635
        {
636
                prefsManager->appPrefs.PDF_Options.isGrayscale = false;
637
                prefsManager->appPrefs.PDF_Options.UseRGB = true;
638
                prefsManager->appPrefs.PDF_Options.UseProfiles = false;
639
                prefsManager->appPrefs.PDF_Options.UseProfiles2 = false;
640
        }
641
        else
642
        {
643
                if (tabPDF->OutCombo->currentItem() == 2)
644
                {
645
                        prefsManager->appPrefs.PDF_Options.isGrayscale = true;
646
                        prefsManager->appPrefs.PDF_Options.UseRGB = false;
647
                        prefsManager->appPrefs.PDF_Options.UseProfiles = false;
648
                        prefsManager->appPrefs.PDF_Options.UseProfiles2 = false;
649
                }
650
                else
651
                {
652
                        prefsManager->appPrefs.PDF_Options.isGrayscale = false;
653
                        prefsManager->appPrefs.PDF_Options.UseRGB = false;
5880 jghali 654
                        if (/*CMSuse*/ ScCore->haveCMS())
2873 cbradney 655
                        {
656
                                prefsManager->appPrefs.PDF_Options.UseProfiles = tabPDF->EmbedProfs->isChecked();
657
                                prefsManager->appPrefs.PDF_Options.UseProfiles2 = tabPDF->EmbedProfs2->isChecked();
658
                                prefsManager->appPrefs.PDF_Options.Intent = tabPDF->IntendS->currentItem();
659
                                prefsManager->appPrefs.PDF_Options.Intent2 = tabPDF->IntendI->currentItem();
660
                                prefsManager->appPrefs.PDF_Options.EmbeddedI = tabPDF->NoEmbedded->isChecked();
661
                                prefsManager->appPrefs.PDF_Options.SolidProf = tabPDF->SolidPr->currentText();
662
                                prefsManager->appPrefs.PDF_Options.ImageProf = tabPDF->ImageP->currentText();
663
                                prefsManager->appPrefs.PDF_Options.PrintProf = tabPDF->PrintProfC->currentText();
664
                        }
665
                }
666
        }
667
        prefsManager->appPrefs.defaultItemAttributes = *(tabDefaultItemAttributes->getNewAttributes());
668
        prefsManager->appPrefs.defaultToCSetups = *(tabDefaultTOCIndexPrefs->getNewToCs());
5352 cbradney 669
//      prefsManager->appPrefs.KeyActions = tabKeys->getNewKeyMap();
670
        prefsManager->appPrefs.KeyActions = tabKeyboardShortcuts->getNewKeyMap();
7109 fschmid 671
        tabPrinter->storeValues();
2873 cbradney 672
}
5504 subik 673
 
674
void Preferences::applyChangesButton_clicked()
675
{
5781 cbradney 676
        ScCore->primaryMainWindow()->prefsOrg(this);
5504 subik 677
}
5507 subik 678
 
679
void Preferences::backToDefaults_clicked()
680
{
681
        prefsManager->initDefaults();
682
        restoreDefaults();
683
}