~ubuntu-branches/ubuntu/maverick/scribus-ng/maverick-backports

« back to all changes in this revision

Viewing changes to scribus/scribus.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Oleksandr Moskalenko
  • Date: 2010-07-15 12:43:00 UTC
  • mfrom: (0.1.8 upstream)
  • Revision ID: james.westby@ubuntu.com-20100715124300-2u304r2rvy55vpkv
Tags: 1.3.7.dfsg~svn20100715-1
* Upstream svn. update.
* debian/scribus-ng.lintian: Updated overrides.
* debian/control: Updated standards version to 3.9.0.

Show diffs side-by-side

added added

removed removed

Lines of Context:
420
420
void ScribusMainWindow::initDefaultValues()
421
421
{
422
422
        HaveDoc = false;
423
 
        ScriptRunning = false;
 
423
        ScriptRunning = 0;
424
424
        view = NULL;
425
425
        doc = NULL;
426
426
        DocNr = 1;
727
727
        scrMenuMgr->addMenuSeparator("Item");
728
728
        scrMenuMgr->addMenuItem(scrActions["itemAdjustFrameToImage"], "Item");
729
729
        scrMenuMgr->addMenuItem(scrActions["itemAdjustImageToFrame"], "Item");
 
730
        scrMenuMgr->addMenuItem(scrActions["itemUpdateImage"], "Item");
 
731
        scrMenuMgr->addMenuItem(scrActions["styleImageEffects"], "Item");
730
732
        scrMenuMgr->addMenuItem(scrActions["itemExtendedImageProperties"], "Item");
731
 
        scrMenuMgr->addMenuItem(scrActions["itemUpdateImage"], "Item");
732
733
        scrMenuMgr->createMenu("ItemPreviewSettings", tr("Preview Settings"), "Item");
733
734
        scrMenuMgr->addMenuItem(scrActions["itemImageIsVisible"], "ItemPreviewSettings");
734
735
        scrMenuMgr->addMenuSeparator("ItemPreviewSettings");
750
751
        scrMenuMgr->addMenuItem(scrActions["itemConvertToOutlines"], "ItemConvertTo");
751
752
        scrMenuMgr->addMenuItem(scrActions["itemConvertToPolygon"], "ItemConvertTo");
752
753
        scrMenuMgr->addMenuItem(scrActions["itemConvertToTextFrame"], "ItemConvertTo");
753
 
 
 
754
        scrMenuMgr->addMenuSeparator("Item");
 
755
        scrMenuMgr->addMenuItem(scrActions["toolsLinkTextFrame"], "Item");
 
756
        scrMenuMgr->addMenuItem(scrActions["toolsUnlinkTextFrame"], "Item");
 
757
        scrMenuMgr->addMenuSeparator("Item");
754
758
        scrMenuMgr->addMenuItem(scrActions["itemAttachTextToPath"], "Item");
755
759
        scrMenuMgr->addMenuItem(scrActions["itemDetachTextFromPath"], "Item");
756
760
//      scrMenuMgr->createMenu("ItemPathOps", tr("Path Tools"), "Item");
767
771
        scrActions["itemLockSize"]->setEnabled(false);
768
772
        scrActions["itemPrintingEnabled"]->setEnabled(false);
769
773
        scrActions["itemImageIsVisible"]->setEnabled(false);
 
774
        scrActions["styleImageEffects"]->setEnabled(false);
770
775
        scrMenuMgr->setMenuEnabled("ItemConvertTo", false);
771
776
        scrActions["itemConvertToBezierCurve"]->setEnabled(false);
772
777
        scrActions["itemConvertToImageFrame"]->setEnabled(false);
1158
1163
                if (currKeySeq == scrActions["specialToggleAllPalettes"]->shortcut())
1159
1164
                        scrActions["specialToggleAllPalettes"]->activate(QAction::Trigger);
1160
1165
                else
 
1166
                if (currKeySeq == scrActions["specialToggleAllGuides"]->shortcut())
 
1167
                        scrActions["specialToggleAllGuides"]->activate(QAction::Trigger);
 
1168
                else
1161
1169
// CB These were moved to ActionManager via the setShortcutContext(Qt::ApplicationShortcut) calls, leaving for notes for now
1162
1170
//              if (currKeySeq == scrActions["toolsProperties"]->accel())
1163
1171
//                      scrActions["toolsProperties"]->toggle();
1593
1601
                                                                if (resizingsmaller)
1594
1602
                                                                {
1595
1603
                                                                        currItem->Sizing = false;
1596
 
                                                                        doc->SizeItem(currItem->width()+resizeBy, currItem->height(), currItem->ItemNr, true);
 
1604
                                                                        doc->SizeItem(currItem->width()+resizeBy, currItem->height(), currItem->ItemNr);
1597
1605
                                                                }
1598
1606
                                                                else
1599
1607
                                                                {
1600
1608
                                                                        doc->MoveItem(-resizeBy, 0, currItem, false);
1601
1609
                                                                        currItem->moveImageXYOffsetBy(resizeBy/currItem->imageXScale(), 0);
1602
1610
                                                                        currItem->Sizing = false;
1603
 
                                                                        doc->SizeItem(currItem->width()+resizeBy, currItem->height(), currItem->ItemNr, true);
 
1611
                                                                        doc->SizeItem(currItem->width()+resizeBy, currItem->height(), currItem->ItemNr);
1604
1612
                                                                }
1605
1613
                                                        }
1606
1614
                                                }
1662
1670
                                                                        doc->MoveItem(-resizeBy, 0, currItem, false);
1663
1671
                                                                        currItem->moveImageXYOffsetBy(resizeBy/currItem->imageXScale(), 0);
1664
1672
                                                                        currItem->Sizing = false;
1665
 
                                                                        doc->SizeItem(currItem->width()+resizeBy, currItem->height(), currItem->ItemNr, true);
 
1673
                                                                        doc->SizeItem(currItem->width()+resizeBy, currItem->height(), currItem->ItemNr);
1666
1674
                                                                }
1667
1675
                                                                else
1668
1676
                                                                {
1669
1677
                                                                        currItem->Sizing = false;
1670
 
                                                                        doc->SizeItem(currItem->width()+resizeBy, currItem->height(), currItem->ItemNr, true);
 
1678
                                                                        doc->SizeItem(currItem->width()+resizeBy, currItem->height(), currItem->ItemNr);
1671
1679
                                                                }
1672
1680
                                                        }
1673
1681
                                                }
1727
1735
                                                                if (resizingsmaller)
1728
1736
                                                                {
1729
1737
                                                                        currItem->Sizing = false;
1730
 
                                                                        doc->SizeItem(currItem->width(), currItem->height()+resizeBy, currItem->ItemNr, true);
 
1738
                                                                        doc->SizeItem(currItem->width(), currItem->height()+resizeBy, currItem->ItemNr);
1731
1739
                                                                }
1732
1740
                                                                else
1733
1741
                                                                {
1734
1742
                                                                        doc->MoveItem(0, -resizeBy, currItem, false);
1735
1743
                                                                        currItem->moveImageXYOffsetBy(0, resizeBy/currItem->imageYScale());
1736
1744
                                                                        currItem->Sizing = false;
1737
 
                                                                        doc->SizeItem(currItem->width(), currItem->height()+resizeBy, currItem->ItemNr, true);
 
1745
                                                                        doc->SizeItem(currItem->width(), currItem->height()+resizeBy, currItem->ItemNr);
1738
1746
                                                                }
1739
1747
                                                        }
1740
1748
                                                }
1796
1804
                                                                        doc->MoveItem(0, -resizeBy, currItem, false);
1797
1805
                                                                        currItem->moveImageXYOffsetBy(0, resizeBy/currItem->imageYScale());
1798
1806
                                                                        currItem->Sizing = false;
1799
 
                                                                        doc->SizeItem(currItem->width(), currItem->height()+resizeBy, currItem->ItemNr, true);
 
1807
                                                                        doc->SizeItem(currItem->width(), currItem->height()+resizeBy, currItem->ItemNr);
1800
1808
                                                                }
1801
1809
                                                                else
1802
1810
                                                                {
1803
1811
                                                                        currItem->Sizing = false;
1804
 
                                                                        doc->SizeItem(currItem->width(), currItem->height()+resizeBy, currItem->ItemNr, true);
 
1812
                                                                        doc->SizeItem(currItem->width(), currItem->height()+resizeBy, currItem->ItemNr);
1805
1813
                                                                }
1806
1814
                                                        }
1807
1815
                                                }
1947
1955
                        }
1948
1956
                }
1949
1957
        }
 
1958
        fileToolBar->connectPrefsSlot(false);
 
1959
        editToolBar->connectPrefsSlot(false);
 
1960
        modeToolBar->connectPrefsSlot(false);
 
1961
        pdfToolBar->connectPrefsSlot(false);
1950
1962
        propertiesPalette->hide();
1951
1963
        outlinePalette->hide();
1952
1964
        scrapbookPalette->hide();
2256
2268
                view = tempView;
2257
2269
        tempDoc->setCurrentPage(tempDoc->Pages->at(0));
2258
2270
        tempDoc->setGUI(requiresGUI, this, tempView);
2259
 
        tempDoc->docHyphenator->ignoredWords = prefsManager->appPrefs.ignoredWords;
2260
 
        tempDoc->docHyphenator->specialWords = prefsManager->appPrefs.specialWords;
 
2271
        if (requiresGUI)
 
2272
        {
 
2273
                tempDoc->docHyphenator->ignoredWords = prefsManager->appPrefs.ignoredWords;
 
2274
                tempDoc->docHyphenator->specialWords = prefsManager->appPrefs.specialWords;
 
2275
        }
2261
2276
        tempDoc->setLoading(false);
2262
2277
        //run after setGUI to set up guidepalette ok
2263
2278
 
2278
2293
        if (requiresGUI)
2279
2294
        {
2280
2295
                wsp->addWindow(w);
2281
 
                connect(undoManager, SIGNAL(undoRedoBegin()), tempDoc, SLOT(undoRedoBegin()));
2282
 
                connect(undoManager, SIGNAL(undoRedoDone()), tempDoc, SLOT(undoRedoDone()));
2283
 
                connect(undoManager, SIGNAL(undoRedoDone()), tempView, SLOT(DrawNew()));
2284
 
                //connect(w, SIGNAL(Schliessen()), this, SLOT(DoFileClose()));
 
2296
                //#9250 : transfered to newActWin()
 
2297
                //connect(undoManager, SIGNAL(undoRedoBegin()), tempDoc, SLOT(undoRedoBegin()));
 
2298
                //connect(undoManager, SIGNAL(undoRedoDone()), tempDoc, SLOT(undoRedoDone()));
 
2299
                //connect(undoManager, SIGNAL(undoRedoDone()), tempView, SLOT(DrawNew()));
2285
2300
                connect(tempView, SIGNAL(signalGuideInformation(int, qreal)), alignDistributePalette, SLOT(setGuide(int, qreal)));
2286
 
                //      connect(w, SIGNAL(SaveAndClose()), this, SLOT(DoSaveClose()));
2287
2301
        }
2288
2302
        //Independent finishing tasks after tempDoc setup
2289
2303
        if (showView)
2346
2360
        alignDistributePalette->setDoc(doc);
2347
2361
        connect(undoManager, SIGNAL(undoRedoDone()), view, SLOT(DrawNew()));
2348
2362
        view->show();
2349
 
        //connect(w, SIGNAL(Schliessen()), this, SLOT(DoFileClose()));
2350
2363
}
2351
2364
 
2352
2365
void ScribusMainWindow::windowsMenuAboutToShow()
2422
2435
        }
2423
2436
        docCheckerPalette->clearErrorList();
2424
2437
 
 
2438
        if (HaveDoc && (doc != NULL) && doc->hasGUI())
 
2439
        {
 
2440
                disconnect(undoManager, SIGNAL(undoRedoBegin()), doc, SLOT(undoRedoBegin()));
 
2441
                disconnect(undoManager, SIGNAL(undoRedoDone()) , doc, SLOT(undoRedoDone()));
 
2442
                disconnect(undoManager, SIGNAL(undoRedoDone()) , doc->view(), SLOT(DrawNew()));
 
2443
        }
 
2444
 
2425
2445
        doc = ActWin->doc();
2426
2446
        undoManager->switchStack(doc->DocName);
2427
2447
 
 
2448
        if ((doc != NULL) && doc->hasGUI())
 
2449
        {
 
2450
                connect(undoManager, SIGNAL(undoRedoBegin()), doc, SLOT(undoRedoBegin()));
 
2451
                connect(undoManager, SIGNAL(undoRedoDone()) , doc, SLOT(undoRedoDone()));
 
2452
                connect(undoManager, SIGNAL(undoRedoDone()) , doc->view(), SLOT(DrawNew()));
 
2453
        }
 
2454
 
2428
2455
        if (view!=NULL)
2429
2456
        {
2430
2457
                actionManager->disconnectNewViewActions();
3054
3081
                else
3055
3082
                {
3056
3083
                        doc->currentStyle = currItem->itemText.defaultStyle();
 
3084
                        propertiesPalette->setParStyle(doc->currentStyle.parent());
 
3085
                        propertiesPalette->setCharStyle(doc->currentStyle.charStyle().parent());
3057
3086
                        emit TextStyle(doc->currentStyle);
3058
3087
                        // to go: (av)
3059
3088
                        emit TextStrike(doc->currentStyle.charStyle().strikethruOffset(), doc->currentStyle.charStyle().strikethruWidth());
3107
3136
                else
3108
3137
                {
3109
3138
                        doc->currentStyle = currItem->itemText.defaultStyle();
 
3139
                        propertiesPalette->setParStyle(doc->currentStyle.parent());
 
3140
                        propertiesPalette->setCharStyle(doc->currentStyle.charStyle().parent());
3110
3141
                        emit TextStyle(doc->currentStyle);
3111
3142
                        // to go: (av)
3112
3143
                        emit TextStrike(doc->currentStyle.charStyle().strikethruOffset(), doc->currentStyle.charStyle().strikethruWidth());
3413
3444
        {
3414
3445
                strippedName = localName = QDir::toNativeSeparators(RecentDocs[m]);
3415
3446
                strippedName.remove(QDir::separator());
3416
 
                scrRecentFileActions.insert(strippedName, new ScrAction(ScrAction::RecentFile, QPixmap(), QPixmap(), QString("&%1 %2").arg(m+1).arg(localName), QKeySequence(), this, 0,0.0,RecentDocs[m]));
 
3447
                scrRecentFileActions.insert(strippedName, new ScrAction(ScrAction::RecentFile, QPixmap(), QPixmap(), QString("&%1 %2").arg(m+1).arg(localName.replace("&","&&")), QKeySequence(), this, 0,0.0,RecentDocs[m]));
3417
3448
                connect( scrRecentFileActions[strippedName], SIGNAL(triggeredData(QString)), this, SLOT(loadRecent(QString)) );
3418
3449
                scrMenuMgr->addMenuItem(scrRecentFileActions[strippedName], recentFileMenuName);
3419
3450
        }
3634
3665
        }
3635
3666
}
3636
3667
 
 
3668
void ScribusMainWindow::updateColorLists()
 
3669
{
 
3670
        if (HaveDoc)
 
3671
        {
 
3672
                propertiesPalette->updateColorList();
 
3673
                propertiesPalette->SetLineFormats(doc);
 
3674
                styleManager->updateColorList();
 
3675
        }
 
3676
}
 
3677
 
 
3678
 
3637
3679
bool ScribusMainWindow::slotDocOpen()
3638
3680
{
3639
3681
        PrefsContext* docContext = prefsManager->prefsFile->getContext("docdirs", false);
3899
3941
                view->updatesOn(false);
3900
3942
                doc->SoftProofing = false;
3901
3943
                doc->Gamut = false;
3902
 
                ScriptRunning = true;
 
3944
                setScriptRunning(true);
3903
3945
                bool loadSuccess=fileLoader->LoadFile(doc);
3904
3946
                //Do the font replacement check from here, when we have a GUI. TODO do this also somehow without the GUI
3905
3947
                //This also gives the user the opportunity to cancel the load when finding theres a replacement required.
3914
3956
                        delete w;
3915
3957
                        view=NULL;
3916
3958
                        doc=NULL;
3917
 
                        ScriptRunning = false;
 
3959
                        setScriptRunning(false);
3918
3960
                        qApp->changeOverrideCursor(QCursor(Qt::ArrowCursor));
3919
3961
                        mainWindowStatusLabel->setText("");
3920
3962
                        mainWindowProgressBar->reset();
3928
3970
                fileLoader->informReplacementFonts();
3929
3971
                setCurrentComboItem(view->unitSwitcher, unitGetStrFromIndex(doc->unitIndex()));
3930
3972
                view->unitChange();
3931
 
                ScriptRunning = false;
 
3973
                setScriptRunning(false);
3932
3974
                view->Deselect(true);
3933
3975
                mainWindowStatusLabel->setText("");
3934
3976
                mainWindowProgressBar->reset();
3953
3995
                        doc->PDF_Options.LPISettings.insert("Black", lpo);
3954
3996
                }
3955
3997
 
3956
 
                //connect(w, SIGNAL(Schliessen()), this, SLOT(DoFileClose()));
3957
3998
                if (!doc->CMSSettings.CMSinUse)
3958
3999
                        doc->HasCMS = false;
3959
4000
                if ((ScCore->haveCMS()) && (doc->CMSSettings.CMSinUse))
4871
4912
{
4872
4913
        propertiesPalette->unsetDoc();
4873
4914
        ScCore->pluginManager->savePreferences();
 
4915
        fileToolBar->connectPrefsSlot(false);
 
4916
        editToolBar->connectPrefsSlot(false);
 
4917
        modeToolBar->connectPrefsSlot(false);
 
4918
        pdfToolBar->connectPrefsSlot(false);
4874
4919
        close();
4875
4920
}
4876
4921
 
5062
5107
                        return;
5063
5108
                if (UndoManager::undoEnabled())
5064
5109
                        activeTransaction = new UndoTransaction(undoManager->beginTransaction(doc->currentPage()->getUName(), 0, Um::Paste, "", Um::IPaste));
5065
 
                if (doc->appMode == modeEdit && doc->m_Selection->itemAt(0))
 
5110
                PageItem* selItem = doc->m_Selection->itemAt(0);
 
5111
                bool isTextFrame  = (dynamic_cast<PageItem_TextFrame*>(selItem) != NULL);
 
5112
                if (doc->appMode == modeEdit && isTextFrame)
5066
5113
                {
5067
5114
                        PageItem_TextFrame *currItem = dynamic_cast<PageItem_TextFrame*>(doc->m_Selection->itemAt(0));
5068
5115
                        assert(currItem != NULL);
5413
5460
 
5414
5461
void ScribusMainWindow::ClipChange()
5415
5462
{
5416
 
        bool hasScribusData = ScMimeData::clipboardHasScribusElem() || ScMimeData::clipboardHasScribusFragment(); 
5417
 
        scrActions["editPaste"]->setEnabled(HaveDoc && (hasScribusData || doc->appMode == modeEdit));
 
5463
        bool textFrameEditMode = false;
 
5464
        bool hasScribusData = ScMimeData::clipboardHasScribusElem() || ScMimeData::clipboardHasScribusFragment();
 
5465
        if (HaveDoc && doc->m_Selection->count() != 0)
 
5466
        {
 
5467
                PageItem *currItem = NULL;
 
5468
                currItem = doc->m_Selection->itemAt(0);
 
5469
                textFrameEditMode  = ((doc->appMode == modeEdit) && (currItem->asTextFrame()));
 
5470
        }
 
5471
        scrActions["editPaste"]->setEnabled(HaveDoc && (hasScribusData || textFrameEditMode));
5418
5472
}
5419
5473
 
5420
5474
void ScribusMainWindow::EnableTxEdit()
5486
5540
                wdir = prefsManager->prefsFile->getContext("dirs")->get("save_text", prefsDocDir);
5487
5541
        else
5488
5542
                wdir = prefsManager->prefsFile->getContext("dirs")->get("save_text", ".");
5489
 
        QString fn = CFileDialog( wdir, tr("Save As"), tr("Text Files (*.txt);;All Files(*)"), "", fdShowCodecs);
 
5543
        QString fn = CFileDialog( wdir, tr("Save As"), tr("Text Files (*.txt);;All Files(*)"), "", fdShowCodecs|fdHidePreviewCheckBox);
5490
5544
        if (!fn.isEmpty())
5491
5545
        {
5492
5546
                prefsManager->prefsFile->getContext("dirs")->set("save_text", fn.left(fn.lastIndexOf("/")));
6402
6456
                                enableTextActions(&scrActions, true, currItem->currentCharStyle().font().scName());
6403
6457
                        if (ScMimeData::clipboardHasScribusData())
6404
6458
                        {
6405
 
//                              if (!hasXMLRootElem(Buffer2, "<SCRIBUSELEM"))
6406
 
//                              {
6407
 
                                        scrActions["editPaste"]->setEnabled(true);
6408
 
//                              }
 
6459
                                bool textFrameEditMode = ((currItem != NULL) && (currItem->asTextFrame()));
 
6460
                                scrActions["editPaste"]->setEnabled( textFrameEditMode || (currItem == NULL) );
6409
6461
                        }
6410
6462
//                      view->slotDoCurs(true);
6411
6463
                        scrMenuMgr->setMenuEnabled("Item", false);
6580
6632
void ScribusMainWindow::setMainWindowActive()
6581
6633
{
6582
6634
        activateWindow();
6583
 
        if (!ScriptRunning)
 
6635
        if (!scriptIsRunning())
6584
6636
                raise();
6585
6637
}
6586
6638
 
7344
7396
                        doc->replaceLineStyleColors(dia2->replaceMap);
7345
7397
                        doc->recalculateColors();
7346
7398
                        doc->recalcPicturesRes();
 
7399
                        updateColorLists();
 
7400
                        /*                      
7347
7401
                        propertiesPalette->updateColorList();
7348
7402
                        propertiesPalette->SetLineFormats(doc);
7349
7403
                        styleManager->updateColorList();
 
7404
                        */
7350
7405
                        if (doc->m_Selection->count() != 0)
7351
7406
                                doc->m_Selection->itemAt(0)->emitAllToGUI();
7352
7407
                        view->DrawNew();
7643
7698
        QString mess;
7644
7699
        if (!ScCore->haveGS())
7645
7700
        {
7646
 
                mess = tr("The following programs are missing:")+"\n\n";
 
7701
                QMessageBox mb(this);
 
7702
                QString msg = tr("Ghostscript is not installed on your system, or Scribus is not configured with the path to the software.");
 
7703
                QString msg2("<qt>");
7647
7704
#ifndef _WIN32
7648
 
                mess += tr("Ghostscript : You cannot use EPS images or Print Preview")+"\n\n";
 
7705
                msg2 += tr("Until this is remedied, you cannot import EPS images or use Print Preview. ")+"\n";
7649
7706
#else
7650
 
                mess += tr("Ghostscript : You cannot use EPS images or PostScript Print Preview")+"\n\n";
 
7707
                msg2 += tr("Until this is remedied, you cannot import EPS images or use PostScript Print Preview. ")+"\n";
7651
7708
#endif
7652
 
                QMessageBox::warning(this, CommonStrings::trWarning, mess, 1, 0, 0);
 
7709
                msg2 += tr("Please read our <a href=\"http://wiki.scribus.net/index.php/Ghostscript\">help and installation instructions</a>.") + "</qt>";
 
7710
                QMessageBox msgBox;
 
7711
                msgBox.addButton(QMessageBox::Ok);
 
7712
                msgBox.setIcon(QMessageBox::Warning);
 
7713
                msgBox.setWindowTitle( tr("Ghostscript is missing") );
 
7714
                msgBox.setText(msg);
 
7715
                msgBox.setInformativeText(msg2);
 
7716
                msgBox.exec();
7653
7717
        }
7654
7718
 
7655
7719
        propertiesPalette->startup();
7673
7737
//      pdfToolBar->initVisibility();
7674
7738
 
7675
7739
        activateWindow();
7676
 
        if (!ScriptRunning)
 
7740
        if (!scriptIsRunning())
7677
7741
                raise();
7678
7742
}
7679
7743
 
8154
8218
        while (*it)
8155
8219
        {
8156
8220
                ip = (BookMItem*)(*it);
8157
 
                Boma.Title = ip->Titel;
 
8221
                Boma.Title = ip->Title;
8158
8222
                Boma.Text = ip->text(0);
8159
8223
                Boma.Aktion = ip->Action;
8160
8224
                Boma.ItemNr = ip->ItemNr;
9026
9090
                        {
9027
9091
                                std::cout << "Saving: " << doc->DocName.toStdString() << ".emergency" << std::endl;
9028
9092
                                doc->autoSaveTimer->stop();
9029
 
                                //disconnect(ActWin, SIGNAL(Schliessen()), ScMW, SLOT(DoFileClose()));
9030
9093
                                FileLoader fl(doc->DocName+".emergency");
9031
9094
                                fl.SaveFile(doc->DocName+".emergency", doc, 0);
9032
9095
                        }