00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055
00056
00057
00058
00059
00060
00061
00062
00063
00064
00065
00066
00067
00068
00069
00070
00071
00072
00073
00074
00075
00076
00077
00078
00079
00080
00081
00082
00083
00084
00085
00086
00087
00088
00089
00090
00091
00092
00093
00094
00095
00096
00097
00098
00099
00100
00101
00102
00103
00104 #include "camtypes.h"
00105
00106 #include "camframe.h"
00107 #include "camelot.h"
00108
00109
00110
00111
00112
00113
00114
00115
00116
00117
00118
00119
00120
00121 #include "optsmsgs.h"
00122 #include "bubbleid.h"
00123
00124
00125 #include "impexpop.h"
00126 #include "filedlgs.h"
00127
00128 #include "helpuser.h"
00129
00130
00131 #include "bitfilt.h"
00132 #include "cameleps.h"
00133
00134
00135 #include "bmpsdlg.h"
00136 #include "exjpeg.h"
00137
00138 #include "fileutil.h"
00139 #include "sgliboil.h"
00140
00141
00142 #include "webaddr.h"
00143
00144 #include "opbevel.h"
00145
00146 #include "bmapprev.h"
00147
00148 #ifdef XAR_TREE_DIALOG
00149 #include "cxftree.h"
00150 #endif
00151
00152 #if _DEBUG
00153
00154 #endif
00155
00156
00157 #ifdef WEBSTER
00158 #define FILTER_JPEG 2
00159 #define TWENTY_FOUR 24
00160 #define ONE 1
00161 #endif //webster
00162
00163
00164
00165
00166
00167 #include "ngsentry.h"
00168 #include "ngscan.h"
00169
00170
00171 #include "filtimag.h"
00172
00173
00174
00175 #include "strlist.h"
00176
00177 CC_IMPLEMENT_DYNCREATE(OpMenuImport, SelOperation)
00178 CC_IMPLEMENT_DYNCREATE(OpMenuExport, SelOperation)
00179 CC_IMPLEMENT_DYNAMIC(BitmapExportParam, OpParam)
00180 CC_IMPLEMENT_DYNCREATE(OpDroppedFile, SelOperation)
00181
00182
00183
00184
00185
00186
00187
00188
00189
00190
00191
00192
00193
00194
00195
00196
00197
00198
00199
00200
00201
00202
00203
00204
00205
00206
00207
00208
00209
00210
00211
00212
00213
00214
00215
00216
00217
00218
00219
00220
00221
00222
00223
00224
00225 UINT32 OpMenuImport::SelectedFilterID = FILTERID_GENERIC;
00226 INT32 OpMenuImport::SelectedFilter = -1;
00227
00228
00229 String_256 OpMenuImport::DefaultImportFilterPath;
00230 String_256 OpMenuExport::DefaultExportFilterPath;
00231
00232
00233
00234
00235
00236
00237
00238
00239
00240
00241
00242
00243
00244
00245
00246 BOOL OpMenuImport::Init()
00247 {
00248
00249
00250 BOOL InitOK;
00251 InitOK = RegisterOpDescriptor( 0,
00252 _R(IDT_IMPORT),
00253 CC_RUNTIME_CLASS(OpMenuImport),
00254 OPTOKEN_MENUIMPORT,
00255 GetState,
00256 0,
00257 _R(IDBBL_FILEIMPORT),
00258 _R(IDD_BARCONTROLSTORE),
00259 _R(IDC_FILEIMPORT),
00260 SYSTEMBAR_FILE,
00261 TRUE,
00262 FALSE,
00263 TRUE,
00264 _R(IDS_OPMENUIMPORT_ONE),
00265 DONT_GREY_WHEN_SELECT_INSIDE | GREY_WHEN_NO_CURRENT_DOC
00266 );
00267 if (!InitOK) return FALSE;
00268
00269
00270 Camelot.DeclareSection(_T("Filters"), 5);
00271 Camelot.DeclarePref(_T("Filters"), _T("DefaultImportFilter"), &SelectedFilterID);
00272 Camelot.DeclarePref(_T("Filters"), _T("DefaultImportFilterPath"), &DefaultImportFilterPath);
00273
00274 PORTNOTE("other", "Removed OpGenericDownload" )
00275 #if 0
00276 if (!OpGenericDownload::Init())
00277 return FALSE;
00278 #endif
00279
00280 return TRUE;
00281 }
00282
00283
00284
00285
00286
00287
00288
00289
00290
00291
00292
00293
00294 void OpMenuImport::Do(OpDescriptor*)
00295 {
00296
00297 if (SelectedFilter == 0)
00298 SelectedFilter = -1;
00299
00300
00301 FilterString = BaseFileDialog::BuildFilterString(TRUE, SelectedFilterID, &SelectedFilter);
00302 if (FilterString == 0)
00303 {
00304
00305 InformError();
00306 FailAndExecute();
00307
00308 End();
00309 return;
00310 }
00311
00312
00313 ImportFileDialog FDialog(FilterString);
00314
00315 FDialog.SetTitle(_R(IDT_IMPORT_TITLE));
00316
00317
00318 if (SelectedFilter != -1)
00319 FDialog.SetSelectedFilterIndex(SelectedFilter);
00320 else
00321 FDialog.SetSelectedFilterIndex(1);
00322
00323
00324 if (DefaultImportFilterPath.Length() > 0)
00325 FDialog.SetInitialDirectory(DefaultImportFilterPath);
00326
00327 BOOL LayersImport = Filter::ImportWithLayers;
00328
00329
00330 BOOL DlgResult = FDialog.OpenAndGetFileName();
00331
00332
00333
00334 if (LayersImport != Filter::ImportWithLayers)
00335 BROADCAST_TO_ALL(OptionsChangingMsg(OptionsChangingMsg::IMPORTWITHLAYERS));
00336
00337 if (!DlgResult)
00338 {
00339
00340 CCFree(FilterString);
00341 FilterString = 0;
00342
00343
00344 FailAndExecute();
00345 End();
00346 return;
00347 }
00348
00349
00350 SelectedFilter = FDialog.GetSelectedFilterIndex();
00351 TRACEUSER( "luke", _T("Looking for ordinal %d"), SelectedFilter );
00352
00353
00354 PathName Path;
00355 if (!FDialog.GetChosenFileName(&Path))
00356 {
00357 InformError();
00358
00359 CCFree(FilterString);
00360 FilterString = 0;
00361 FailAndExecute();
00362 End();
00363 return;
00364 }
00365
00366
00367 DefaultImportFilterPath = Path.GetLocation(FALSE);
00368
00369
00370 Filter *pFilter = Filter::GetFirst();
00371 while (pFilter != 0)
00372 {
00373 if( NULL != pFilter->pOILFilter )
00374 {
00375 if( ( pFilter->GetFlags().CanImport && !IS_A( pFilter, CamelotEPSFilter ) ) &&
00376 pFilter->pOILFilter->Position == SelectedFilter )
00377 {
00378 TRACEUSER( "luke", _T("%s is THE filter (%d)"),
00379 (TCHAR*)pFilter->FilterName, pFilter->pOILFilter->Position );
00380
00381
00382 break;
00383 }
00384
00385 TRACEUSER( "luke", _T("%s is not selected (ord=%d)"),
00386 (TCHAR*)pFilter->FilterName, pFilter->pOILFilter->Position );
00387 }
00388 else
00389 TRACEUSER( "luke", _T("Can't handle NULL pFilter->pOILFilter for %s"),
00390 (TCHAR*)pFilter->FilterName );
00391
00392
00393 pFilter = Filter::GetNext(pFilter);
00394 }
00395
00396
00397 CCFree(FilterString);
00398 FilterString = 0;
00399
00400 if (pFilter == 0)
00401 {
00402 InformError(_R(IDT_CANT_FIND_FILTER));
00403 FailAndExecute();
00404 }
00405 else
00406 {
00407 SelectedFilterID = pFilter->FilterID;
00408
00409 String_256 URL = Path.GetPath();
00410
00411 TRACEUSER( "luke", _T("Path = %s\n"), (TCHAR*)URL );
00412
00413
00414 DocView* pDocView=DocView::GetCurrent();
00415
00416
00417 ImportPosition posToUse=pDocView->GetCentreImportPosition();
00418
00419
00420 DoImport(Path, pFilter, &URL, &posToUse);
00421 }
00422 }
00423
00424
00425
00426
00427
00428
00429
00430
00431
00432
00433
00434
00435
00436
00437
00438
00439
00440 void OpMenuImport::DoImport(PathName Path, Filter* pFilter, String_256* URL, ImportPosition* pImportPosition)
00441 {
00442
00443
00444
00445 if (!pFilter->IS_KIND_OF(FilterFamily))
00446 {
00447 UINT32 Size = 1024;
00448 size_t FileSize;
00449 ADDR FilterBuf = pFilter->LoadInitialSegment(Path, &Size, &FileSize);
00450
00451
00452 if (FilterBuf == 0)
00453 {
00454
00455 InformError();
00456 FailAndExecute();
00457 End();
00458 return;
00459 }
00460
00461
00462
00463
00464
00465
00466 pFilter->PreHowCompatible();
00467
00468
00469
00470 if (pFilter->HowCompatible(Path, FilterBuf, Size, FileSize) < 8)
00471 {
00472
00473 ErrorInfo Question;
00474 Question.ErrorMsg = _R(IDT_IMPQUERY_NOTSURE);
00475 Question.Button[0] = _R(IDB_IMPQUERY_IMPORT);
00476 Question.Button[1] = _R(IDB_IMPQUERY_DONTIMPORT);
00477
00478 if (UINT32(AskQuestion(&Question)) != _R(IDB_IMPQUERY_IMPORT))
00479 {
00480
00481 TRACEUSER( "Tim", _T("Filter compatibility was less than 10\n"));
00482
00483
00484 CCFree(FilterBuf);
00485 FailAndExecute();
00486 InformMessage(_R(IDT_IMP_USERABORT));
00487 End();
00488 return;
00489 }
00490 }
00491
00492
00493 CCFree(FilterBuf);
00494 }
00495
00496
00497 if (DoStartSelOp(FALSE))
00498
00499
00500 {
00501
00502 CCDiskFile DiskFile(1024, FALSE, TRUE);
00503
00504
00505 Document* pCurDoc = Document::GetCurrent();
00506
00507 try
00508 {
00509 if (!DiskFile.open(Path, ios::in | ios::binary))
00510 {
00511
00512 TRACEUSER( "Rik", _T("Failed to open file in MenuImport Do"));
00513 InformError(_R(IDT_IMPORT_NOTFOUND));
00514 FailAndExecute();
00515 End();
00516 return;
00517 }
00518
00519
00520 if (!pFilter->DoImport(this, &DiskFile, pCurDoc, FALSE, pImportPosition, 0, 0, URL))
00521 {
00522
00523 if (Error::GetErrorNumber() != _R(IDN_USER_CANCELLED))
00524 InformError();
00525 else
00526 Error::ClearError();
00527 FailAndExecute();
00528 End();
00529
00530
00531 if (DiskFile.isOpen())
00532 DiskFile.close();
00533
00534 return;
00535 }
00536
00537
00538 if (DiskFile.isOpen())
00539 DiskFile.close();
00540
00541 }
00542
00543
00544 catch(CFileException e)
00545 {
00546
00547 if (Error::GetErrorNumber() != _R(IDN_USER_CANCELLED))
00548 InformError();
00549 else
00550 Error::ClearError();
00551
00552
00553 try
00554 {
00555 if (DiskFile.isOpen())
00556 DiskFile.close();
00557 }
00558 catch(CFileException e)
00559 {
00560
00561 }
00562
00563
00564 FailAndExecute();
00565 }
00566 }
00567
00568
00569 GetMainFrame()->SetFocus();
00570
00571 End();
00572 }
00573
00574
00575
00576
00577
00578
00579
00580
00581
00582
00583
00584
00585 void OpMenuImport::EndImport()
00586 {
00587 FailAndExecute();
00588 End();
00589 }
00590
00591
00592
00593
00594
00595
00596
00597
00598
00599
00600
00601
00602
00603
00604
00605
00606
00607 BOOL OpMenuImport::OnDocChangingMsg(Document* pChangingDoc, DocChangingMsg::DocState State)
00608 {
00609 if (State == DocChangingMsg::ABOUTTODIE && pChangingDoc == pOurDoc)
00610 {
00611 EndImport();
00612 }
00613
00614 return TRUE;
00615 }
00616
00617
00618
00619
00620
00621
00622
00623
00624
00625
00626
00627
00628 OpMenuImport::OpMenuImport()
00629 {
00630 OpFlags.HasOwnTimeIndicator = TRUE;
00631 }
00632
00633
00634
00635
00636
00637
00638
00639
00640
00641
00642
00643
00644
00645 OpState OpMenuImport::GetState(String_256*, OpDescriptor*)
00646 {
00647 OpState OpSt;
00648
00649 return OpSt;
00650 }
00651
00652 INT32 OpMenuExport::SelectedFilter = -1;
00653 INT32 OpMenuExport::SelectedBitmapFilter = -1;
00654
00655
00656
00657
00658
00659
00660
00661
00662
00663 UINT32 OpMenuExport::SelectedFilterID = FILTERID_EXPORT_JPEG;
00664 UINT32 OpMenuExport::DefaultBitmapFilterID = FILTERID_EXPORT_JPEG;
00665
00666 List * OpMenuExport::m_pSelNodeList = 0;
00667
00668
00669
00670
00671
00672
00673
00674
00675
00676
00677
00678
00679
00680 BOOL OpMenuExport::Init()
00681 {
00682
00683 BOOL InitOK;
00684 InitOK = RegisterOpDescriptor( 0,
00685 _R(IDT_EXPORT),
00686 CC_RUNTIME_CLASS(OpMenuExport),
00687 OPTOKEN_MENUEXPORT,
00688 GetState,
00689 0,
00690 _R(IDBBL_FILEEXPORT),
00691 _R(IDD_BARCONTROLSTORE),
00692 _R(IDC_FILEEXPORT),
00693 SYSTEMBAR_FILE,
00694 TRUE,
00695 FALSE,
00696 FALSE,
00697
00698 _R(IDS_OPMENUEXPORT_ONE),
00699 DONT_GREY_WHEN_SELECT_INSIDE | GREY_WHEN_NO_CURRENT_DOC
00700 );
00701 if (!InitOK) return FALSE;
00702
00703 Camelot.DeclareSection(_T("Filters"), 5);
00704 Camelot.DeclarePref(_T("Filters"), _T("DefaultExportFilter"), &SelectedFilterID);
00705 Camelot.DeclarePref(_T("Filters"), _T("DefaultExportFilterPath"), &DefaultExportFilterPath);
00706 Camelot.DeclarePref(_T("Filters"), _T("DefaultBitmapFilter"), &DefaultBitmapFilterID);
00707
00708 return TRUE;
00709 }
00710
00711
00712
00713
00714
00715
00716
00717
00718
00719
00720
00721
00722
00723
00724
00725 void OpMenuExport::Do(OpDescriptor* OpDesc)
00726 {
00727 DoWithParam(OpDesc, 0);
00728 }
00729
00730
00731
00732
00733
00734
00735
00736
00737
00738
00739
00740
00741 void OpMenuExport::SaveSelection()
00742 {
00743 if (m_pSelNodeList)
00744 {
00745 m_pSelNodeList->DeleteAll();
00746 delete m_pSelNodeList;
00747 m_pSelNodeList = 0;
00748 }
00749
00750 SelRange* pRng = GetApplication()->FindSelection();
00751 if (pRng == 0)
00752 {
00753 ERROR3("No SelRange in OpMenuExport::SaveSelection");
00754 return;
00755 }
00756
00757 pRng->SetGag(TRUE);
00758 m_pSelNodeList = pRng->MakeListOfNodes(FALSE);
00759 }
00760
00761
00762
00763
00764
00765
00766
00767
00768
00769
00770 void OpMenuExport::NormaliseSelection()
00771 {
00772
00773 SelRange* pRng = GetApplication()->FindSelection();
00774 if (pRng == 0)
00775 {
00776 ERROR3("No range in OpMenuExport::NormaliseSelection");
00777 return;
00778 }
00779
00780 for (Node* pNode = pRng->FindFirst(FALSE);
00781 pNode != 0;
00782 pNode = pRng->FindNext(pNode, FALSE))
00783 if (pNode->IsAnObject())
00784 for (Node* pParent = pNode->FindParent();
00785 pParent != 0 && pParent->IsAnObject();
00786 pParent = pParent->FindParent())
00787 if (pParent->ShouldITransformWithChildren())
00788 {
00789 pParent->SetSelected(FALSE);
00790 pParent->SetSelected(TRUE);
00791 }
00792
00793 pRng->Update();
00794 }
00795
00796
00797
00798
00799
00800
00801
00802
00803
00804
00805
00806
00807
00808 void OpMenuExport::RestoreSelection()
00809 {
00810 SelRange* pRng = GetApplication()->FindSelection();
00811 if (pRng == 0)
00812 {
00813 ERROR3("No range in OpMenuExport::RestoreSelection");
00814 return;
00815 }
00816
00817 if (pRng->IsSelRangeGagged()) pRng->SetGag(FALSE);
00818 NodeRenderableInk::DeselectAll(FALSE, FALSE);
00819
00820 if (!m_pSelNodeList)
00821 {
00822 ERROR3("Sel node list not set up");
00823 return;
00824 }
00825
00826 for (NodeListItem* pItem = (NodeListItem*) m_pSelNodeList->GetHead();
00827 pItem != 0;
00828 pItem = (NodeListItem*) m_pSelNodeList->GetNext(pItem))
00829 if (pItem->pNode != 0) pItem->pNode->SetSelected(TRUE);
00830
00831 m_pSelNodeList->DeleteAll();
00832 delete m_pSelNodeList;
00833 m_pSelNodeList = 0;
00834
00835 RangeControl rg = pRng->GetRangeControlFlags();
00836 rg.PromoteToParent = FALSE;
00837 pRng->Range::SetRangeControl(rg);
00838 pRng->Update();
00839
00840 }
00841
00842 void RemoveUneededReportedErrors()
00843 {
00844
00845
00846 if (Error::GetErrorNumber() != _R(IDN_USER_CANCELLED) && Error::GetErrorNumber() != 0)
00847 InformError();
00848 else
00849 Error::ClearError();
00850 }
00851
00852
00853
00854
00855
00856
00857
00858
00859
00860
00861
00862
00863
00864 void OpMenuExport::DoWithParam(OpDescriptor*, OpParam* pParam)
00865 {
00866
00867 SaveSelection();
00868 NormaliseSelection();
00869
00870
00871 #ifdef WEBSTER
00872
00873 INT32 BitmapFilter = 0;
00874 #endif //webster
00875
00876
00877 if (SelectedFilter == 0) SelectedFilter = -1;
00878 if (SelectedBitmapFilter == 0) SelectedBitmapFilter = -1;
00879
00880 ERROR3IF(pParam != 0 && !pParam->IS_KIND_OF(BitmapExportParam),
00881 "OpMenuExport::DoWithParam: OpParam passed is not a BitmapExportParam");
00882
00883
00884 UINT32 Bpp = 0;
00885 BitmapExportParam* pExportParam = (BitmapExportParam*) pParam;
00886 if (pExportParam != 0)
00887 {
00888
00889
00890
00891
00892 KernelBitmap* pTheBitmap;
00893 if (pExportParam->GetBitmapCount() == 0 ||
00894 (pTheBitmap = pExportParam->GetBitmap(0)) == 0)
00895 {
00896 ERROR2RAW("OpMenuExport::DoWithParam: no bitmaps, or null pointer");
00897 FailAndExecute();
00898 RestoreSelection();
00899 End();
00900 return;
00901 }
00902
00903
00904
00905
00906 Bpp = pTheBitmap->GetBPP();
00907
00908
00909
00910
00911
00912
00913
00914
00915
00916
00917
00918
00919
00920
00921
00922
00923 BitmapSource* pSource = 0;
00924 BaseBitmapFilter* pDummyFilter;
00925
00926 BOOL OriginalSourcePresent = pTheBitmap->GetOriginalSource(&pSource,&pDummyFilter);
00927 if (OriginalSourcePresent)
00928 {
00929 DefaultBitmapFilterID = FILTERID_EXPORT_JPEG;
00930 SelectedBitmapFilter = 0;
00931 }
00932 else
00933 {
00934
00935 }
00936
00937 FilterString = BaseFileDialog::BuildFilterString(
00938 FALSE,
00939 DefaultBitmapFilterID,
00940 &SelectedBitmapFilter,
00941 CC_RUNTIME_CLASS(BitmapFilter),
00942 Bpp,
00943 pExportParam->GetBitmapCount());
00944
00945 }
00946 else
00947 {
00948
00949 FilterString = BaseFileDialog::BuildFilterString(
00950 FALSE,
00951 SelectedFilterID,
00952 &SelectedFilter);
00953 }
00954
00955 if (FilterString == 0)
00956 {
00957
00958 InformError();
00959 FailAndExecute();
00960
00961
00962 RestoreSelection();
00963 End();
00964 return;
00965 }
00966
00967
00968 ExportFileDialog FDialog(FilterString);
00969 INT32 TheSelectedFilter = -1;
00970 String_256 DefaultName;
00971
00972 FDialog.SetTitle(_R(IDT_EXPORT_TITLE));
00973
00974
00975
00976
00977
00978 if (pExportParam == 0)
00979 TheSelectedFilter = SelectedFilter;
00980 else
00981 {
00982
00983 KernelBitmap* pTheBitmap = pExportParam->GetBitmap(0);
00984
00985 if (pTheBitmap->ActualBitmap)
00986 DefaultName = pTheBitmap->ActualBitmap->GetName();
00987 else
00988 SetBitmapName(pTheBitmap, &DefaultName, pExportParam);
00989
00990
00991 FDialog.SetDefaultFileName(DefaultName);
00992 FDialog.ExportABitmap(TRUE, pTheBitmap);
00993
00994
00995 TheSelectedFilter = SelectedBitmapFilter;
00996 }
00997
00998
00999 FDialog.SetSelectedFilterIndex(TheSelectedFilter != -1 ? TheSelectedFilter : 1);
01000
01001
01002 if (DefaultExportFilterPath.Length() > 0)
01003 FDialog.SetInitialDirectory(DefaultExportFilterPath);
01004
01005
01006
01007 PathName Path;
01008 Filter* pFilter;
01009 do
01010 {
01011
01012 BOOL DlgResult = FDialog.OpenAndGetFileName();
01013 if (!DlgResult)
01014 {
01015
01016 #ifdef WEBSTER
01017
01018
01019 SelectedBitmapFilter = BitmapFilter;
01020 #endif //webster
01021
01022 CCFree(FilterString);
01023 FilterString = 0;
01024 RestoreSelection();
01025 End();
01026 return;
01027 }
01028
01029
01030 TheSelectedFilter = FDialog.GetSelectedFilterIndex();
01031 if (pExportParam == 0)
01032 SelectedFilter = TheSelectedFilter;
01033 else
01034 SelectedBitmapFilter = TheSelectedFilter;
01035
01036
01037 FDialog.GetChosenFileName(&Path);
01038
01039
01040 for (pFilter = Filter::GetFirst();
01041 pFilter != 0;
01042 pFilter = Filter::GetNext(pFilter))
01043 {
01044 if( NULL == pFilter->pOILFilter )
01045 continue;
01046
01047 if (pFilter->GetFlags().CanExport &&
01048 pFilter->pOILFilter->Position == TheSelectedFilter)
01049
01050 break;
01051 }
01052
01053 if (pFilter == 0)
01054 {
01055 InformError(_R(IDT_CANT_FIND_FILTER));
01056
01057
01058 CCFree(FilterString);
01059 FilterString = 0;
01060 RestoreSelection();
01061 FailAndExecute();
01062 End();
01063 return;
01064 }
01065
01066
01067
01068
01069
01070
01071
01072
01073
01074 if (!pFilter->pOILFilter->DoesExtensionOfPathNameMatch(&Path))
01075 {
01076
01077
01078 pFilter->pOILFilter->FixExtensionOfPathName(&Path);
01079 }
01080
01081
01082 if (!Path.IsValid())
01083 {
01084 InformError();
01085
01086
01087 CCFree(FilterString);
01088 FilterString = 0;
01089 FailAndExecute();
01090 RestoreSelection();
01091 End();
01092 return;
01093 }
01094
01095
01096 if( SGLibOil::FileExists( &Path ) )
01097 {
01098 ErrorInfo Info;
01099 Info.ErrorMsg = _R(IDS_SAVEAS_OVERWRITE);
01100 Info.Button[0] = _R(IDS_OVERWRITE);
01101 Info.Button[1] = _R(IDB_SAVEAS);
01102 Info.Button[2] = _R(IDS_CANCEL);
01103
01104 UINT32 Answer = AskQuestion(&Info);
01105
01106 if (Answer==_R(IDS_OVERWRITE))
01107 {
01108
01109 break;
01110 }
01111 else if (Answer== _R(IDB_SAVEAS))
01112 {
01113
01114 continue;
01115 }
01116 else if (Answer==_R(IDS_CANCEL))
01117 {
01118
01119 End();
01120 return;
01121 }
01122 else
01123 ERROR3("Unknown Answer from AskQuestion");
01124 }
01125 }
01126 while( SGLibOil::FileExists( &Path ) );
01127
01128 PORTNOTE("other", "Removed BmapPrevDlg usage" )
01129 #if !defined(EXCLUDE_FROM_XARALX)
01130
01131 BmapPrevDlg::m_pthExport = Path;
01132 #endif
01133
01134
01135 DefaultExportFilterPath = Path.GetLocation(FALSE);
01136
01137 UINT32 TheSelectedFilterID = pFilter->FilterID;
01138 if (pExportParam == 0)
01139 SelectedFilterID = TheSelectedFilterID;
01140 else
01141 DefaultBitmapFilterID = TheSelectedFilterID;
01142
01143
01144
01145
01146
01147
01148
01149
01150
01151 if (TheSelectedFilterID != FILTERID_CAMELOT_EPS &&
01152 TheSelectedFilterID != FILTERID_NATIVE_EPS &&
01153 TheSelectedFilterID != FILTERID_AIEPS
01154 && pFilter->IS_KIND_OF ( EPSFilter )
01155 )
01156 {
01157
01158
01159
01160 ErrorInfo Info;
01161 Info.ErrorMsg = _R(IDT_EXPQUERY_NOTSURE);
01162 Info.Button[0] = _R(IDB_EXPQUERY_EXPORT);
01163 Info.Button[1] = _R(IDB_EXPQUERY_DONTEXPORT);
01164 if (UINT32(AskQuestion(&Info)) == _R(IDB_EXPQUERY_DONTEXPORT))
01165 {
01166
01167 CCFree(FilterString);
01168 FilterString = 0;
01169 FailAndExecute();
01170 RestoreSelection();
01171 End();
01172 return;
01173 }
01174 }
01175
01176 BOOL fExportedOk = FALSE;
01177
01179
01180
01181
01182
01183
01184
01185
01186 BitmapExportOptions* pOptions = NULL;
01187 if (pFilter->IS_KIND_OF(BaseBitmapFilter))
01188 {
01189 if (BmapPrevDlg::m_pExportOptions)
01190 {
01191 delete BmapPrevDlg::m_pExportOptions;
01192 BmapPrevDlg::m_pExportOptions = 0;
01193 }
01194
01195
01196 if (pExportParam == 0)
01197 {
01198
01199
01200 PORTNOTE("other", "Use SetUpExportOptions to get defaults only and not do dialog" )
01201 ((BaseBitmapFilter*) pFilter)->SetUpExportOptions(&pOptions, FALSE);
01202
01203
01204
01205 if (BmapPrevDlg::m_pExportOptions)
01206 pOptions = BmapPrevDlg::m_pExportOptions;
01207
01208 BmapPrevDlg::m_pExportOptions = 0;
01209
01210 if (pOptions)
01211 {
01212 Filter * pOldFilter = pFilter;
01213 pFilter = pOptions->FindBitmapFilterForTheseExportOptions();
01214
01215 if (pFilter && pFilter != pOldFilter)
01216 {
01217
01218 Path.SetType(BmapPrevDlg::m_pthExport.GetType());
01219 }
01220 else pFilter = pOldFilter;
01221 }
01222
01223 if (!pOptions || !pFilter)
01224 {
01225
01226 RemoveUneededReportedErrors();
01227 CCFree(FilterString);
01228 FilterString = 0;
01229 FailAndExecute();
01230 RestoreSelection();
01231 End();
01232 return;
01233 }
01234
01235
01236 ((BaseBitmapFilter*) pFilter)->PostGetExportOptions(pOptions);
01237 }
01238 }
01239
01240 BOOL bFinished = FALSE;
01241
01242
01243 if (pOptions != 0 && pOptions->HasTempFile() && !pOptions->GetSeparateLayerFiles())
01244 {
01245
01246 PathName TempPath = pOptions->GetPathName();
01247 String_256 FinalName = Path.GetPath();
01248 String_256 TempName = TempPath.GetPath();
01249
01250
01251 FileUtil::DeleteFile(&Path);
01252
01253
01254
01255
01256
01257
01258
01259
01260
01261
01262
01263
01264
01265 bFinished = !camRename(TempName, FinalName);
01266
01267 if (bFinished)
01268 {
01269 fExportedOk = TRUE;
01270
01271 RemoveUneededReportedErrors();
01272 }
01273 }
01274
01275
01276 if(pOptions)
01277 pOptions->SetTempFileFlag(FALSE);
01278
01279 PORTNOTE( "export", "Removed image map code" )
01280 #if !defined(EXCLUDE_FROM_XARALX)
01281
01282 if (pOptions && pOptions->GetSupportsImageMap() && pFilter->IS_KIND_OF(BaseBitmapFilter))
01283 static_cast<BaseBitmapFilter *>(pFilter)->ExportImagemap(this, &Path, GetWorkingDoc());
01284 #endif
01285
01286 if (pOptions != NULL)
01287 {
01288
01289 if (pOptions->ShouldPutHTMLTagOnClipboard() && pFilter->IS_KIND_OF(BaseBitmapFilter))
01290 static_cast<BaseBitmapFilter *>(pFilter)->ExportHTMLTag(&Path);
01291
01292 PORTNOTE("other", "Removed DreamWeaver DesignNote code" )
01293 #if 0
01294
01295 if (pOptions->GetCanUseDesignNotes() && UsesDesignNotes())
01296 {
01297 if( !lstrcmpi( Path.GetType(), _T("gif") ) || !lstrcmpi( Path.GetType(), _T("jpg") ) ||
01298 !lstrcmpi( Path.GetType(), _T("bmp") ) || !lstrcmpi( Path.GetType(), _T("png") ) )
01299 {
01300 wxString DocName( (TCHAR *)Document::GetCurrent()->GetLocation() );
01301 DocName += _T("\\");
01302 DocName += (TCHAR *)Document::GetCurrent()->GetPathName();
01303
01304 if (DocName != _T("\\") )
01305 {
01306 wxString GraphicFile( (const TCHAR *)Path.GetPath() );
01307
01308
01309 CreateDesignNoteWithForwardSource(GraphicFile, DocName);
01310 }
01311 else
01312 {
01313 InformWarning (_R(IDS_NOTES_WARNING));
01314 }
01315 }
01316 }
01317 #endif
01318 }
01319
01320 if (!bFinished)
01321 {
01322
01323
01325
01326
01327 CCDiskFile theDiskFile(1024, FALSE, TRUE);
01328 try
01329 {
01330
01331
01332
01333
01334
01335
01336
01337
01338
01339
01340
01341
01342
01343
01344
01345
01346
01347
01348
01349
01350 if (pFilter->CanIncludePreviewBmp()) pFilter->IncludePreviewBmp(TRUE);
01351
01352
01353 if (pExportParam != 0)
01354 {
01355 ERROR3IF(!pFilter->IS_KIND_OF(BaseBitmapFilter),
01356 "OpMenuExport::not a bitmap filter");
01357 BaseBitmapFilter* pBitmapFilter = (BaseBitmapFilter*) pFilter;
01358
01359 if (pExportParam->GetBitmapCount() != 1)
01360 fExportedOk = pBitmapFilter->DoExportBitmaps(
01361 this,
01362 &theDiskFile,
01363 &Path,
01364 pExportParam);
01365 else
01366 {
01368
01369
01370 if (pFilter->IS_KIND_OF(BaseBitmapFilter) && pOptions)
01371 fExportedOk =
01372 pBitmapFilter->DoExportBitmapWithOptions(
01373 this,
01374 &theDiskFile,
01375 &Path,
01376 pExportParam->GetBitmap(0),
01377 pOptions);
01378 else
01380
01381 fExportedOk = pBitmapFilter->DoExportBitmap(
01382 this,
01383 &theDiskFile,
01384 &Path,
01385 pExportParam->GetBitmap(0));
01386
01387 }
01388 }
01389 else
01390 {
01392
01393
01394 if (pFilter->IS_KIND_OF(BaseBitmapFilter) && pOptions)
01395 fExportedOk = ((BaseBitmapFilter*) pFilter)->DoExportWithOptions(
01396 this,
01397 &theDiskFile,
01398 &Path,
01399 GetWorkingDoc(),
01400 pOptions);
01401 else
01402 fExportedOk = pFilter->DoExport(this,
01403 &theDiskFile,
01404 &Path,
01405 GetWorkingDoc());
01406 }
01407
01408 if (!fExportedOk)
01409 {
01410 if (Error::GetErrorNumber() == _R(IDN_USER_CANCELLED))
01411
01412 Error::ClearError();
01413 else
01414 {
01415
01416 InformError();
01417 pFilter->DeleteExportFile(&theDiskFile);
01418 }
01419 }
01420
01421
01422 if (pFilter->CanIncludePreviewBmp()) pFilter->IncludePreviewBmp(FALSE);
01423
01424
01425 if (theDiskFile.isOpen()) theDiskFile.close();
01426 }
01427
01428
01429 catch( CFileException e )
01430 {
01431
01432 RemoveUneededReportedErrors();
01433
01434
01435 try
01436 {
01437
01438
01439 if (pFilter) pFilter->DeleteExportFile(&theDiskFile);
01440 if (theDiskFile.isOpen()) theDiskFile.close();
01441 }
01442 catch(CFileException e)
01443 {
01444
01445 TRACE( _T("Failed to close file\n"));
01446 }
01447
01448 fExportedOk = FALSE;
01449 }
01450
01452
01453 }
01455
01456
01457 CCFree(FilterString);
01458 FilterString = 0;
01459 RestoreSelection();
01460
01461 if (!fExportedOk)
01462 {
01463
01464 if (pOptions)
01465 delete pOptions;
01466
01467 FailAndExecute();
01468 End();
01469 return;
01470 }
01471
01472
01473 BOOL fExportedSelection = FALSE;
01474 if (pFilter->IS_KIND_OF(BaseBitmapFilter) && pParam == 0 && pOptions)
01475 {
01476 fExportedSelection = (pOptions->GetSelectionType() == SELECTION);
01477 }
01478
01479
01480 if (fExportedSelection)
01481 CreateNamedSet(pFilter, Path);
01482 else
01483 SucceedAndDiscard();
01484
01485
01486 if (pOptions)
01487 delete pOptions;
01488
01489 End();
01490 }
01491
01492
01493
01494
01495
01496
01497
01498
01499
01500
01501
01502
01503
01504 void OpMenuExport::CreateNamedSet(Filter* pFilter, const PathName& pthTarget)
01505 {
01506 PORTNOTETRACE("other", "CreateNamedSet - Do nothing - Use NgScan");
01507 #if !defined(EXCLUDE_FROM_XARALX)
01508
01509 String_256 strName(pthTarget.GetFileName(FALSE));
01510 NodeSetSentinel* pSentry = GetWorkingDoc()->GetSetSentinel();
01511 NodeSetProperty* pSet = pSentry->FindPropertyNode(strName);
01512
01513
01514
01515
01516
01517 BOOL fMustCreateNewSet = TRUE;
01518 if (pSet != 0)
01519 {
01520 NamedExportProp* pProp =
01521 (NamedExportProp*) pSet->GetProperty(NamedExportProp::nIndex);
01522 if (
01523 pProp->GetPath().GetLocation() != pthTarget.GetLocation() ||
01524 pProp->GetPath().GetFileName(FALSE) != pthTarget.GetFileName(FALSE))
01525 {
01526
01527 String_256 strBase = strName;
01528 INT32 nAppend = 2;
01529 while (pSentry->GetNameAttr(strName) != 0)
01530 strName.MakeMsg(_R(IDS_NAMEDLG_UNIQUE_MASK), &strBase, nAppend++);
01531 }
01532 else
01533
01534
01535
01536
01537 fMustCreateNewSet = FALSE;
01538 }
01539
01540
01541 if (fMustCreateNewSet)
01542 {
01543 TRACEUSER( "JustinF", _T("Creating export set %s\n"), (LPCTSTR) strName);
01544
01545
01546 AllowOpScan aosSel(this, &theSelectedObjects),
01547 aosSentinel(this, &theSetSentinel);
01548
01549 if (!aosSel.Scan() ||
01550 !aosSentinel.Scan() ||
01551 !DoStartSelOp(FALSE, FALSE) ||
01552 !ApplySingleScan(this, &theSelectedObjects, strName).Scan() ||
01553 !ApplySingleScan(this, &theSetSentinel, strName).Scan() ||
01554 !ApplyPropScan(this, strName).Scan() ||
01555 !aosSel.Update() ||
01556 !aosSentinel.Update() ||
01557 (pSet = pSentry->FindPropertyNode(strName)) == 0)
01558 {
01559 TRACEUSER( "JustinF", _T("OpMenuExport::CreateNamedSet: naming scan failed\n"));
01560 FailAndExecute();
01561 return;
01562 }
01563 }
01564
01565
01566 NamedExportProp* pProp =
01567 (NamedExportProp*) pSet->GetProperty(NamedExportProp::nIndex);
01568 ERROR3IF(pProp == 0, "OpMenuExport::CreateNamedSet: no export property");
01569
01570 pProp->SetFilter(pFilter);
01571 pProp->SetPath(pthTarget);
01572 pProp->SetDirty();
01573
01574
01575
01576 ERROR3IF(!pFilter->IS_KIND_OF(BaseBitmapFilter),
01577 "OpMenuExport::CreateNamedSet: not a bitmap filter");
01578 BitmapExportOptions* pOptions =
01579 ((BaseBitmapFilter*) pFilter)->GetBitmapExportOptions();
01580 pProp->SetOptions(pOptions);
01581 #endif
01582 }
01583
01584
01585
01586
01587
01588
01589
01590
01591
01592
01593
01594
01595
01596
01597
01598
01599
01600
01601
01602 BOOL OpMenuExport::SetBitmapName(KernelBitmap * pTheBitmap, String_256 * DefaultName,
01603 BitmapExportParam* pExportParam)
01604 {
01605 OILBitmap* pOilBitmap = pTheBitmap->ActualBitmap;
01606 if (pOilBitmap)
01607 {
01608 *DefaultName = pOilBitmap->GetName();
01609
01610
01611
01612 PathName TempPath(*DefaultName);
01613 String_32 Extension = TempPath.GetType();
01614
01615
01616 Filter *pFilter = Filter::GetFirst();
01617 while (pFilter != 0)
01618 {
01619 if ((pFilter->GetFlags().CanExport) &&
01620 (pFilter->FilterID == DefaultBitmapFilterID))
01621
01622 break;
01623
01624
01625 pFilter = Filter::GetNext(pFilter);
01626 }
01627
01628 if (pFilter && pFilter->pOILFilter)
01629 {
01630
01631
01632 if (!pFilter->pOILFilter->DoesExtensionOfPathNameMatch(&TempPath))
01633 {
01634
01635
01636 pFilter->pOILFilter->FixExtensionOfPathName(&TempPath);
01637
01638 *DefaultName = TempPath.GetPath();
01639 }
01640
01641
01642
01643
01644 String_256 fileName = TempPath.GetFileName(FALSE);
01645
01646 String_32 searchString;
01647 searchString.MakeMsg(_R(IDS_BITMAP_NAME), "","");
01648 INT32 index = fileName.Sub(searchString);
01649 if (index > 0)
01650 {
01651 if (pExportParam != 0 && pExportParam->GetBitmapCount() > 1)
01652 {
01653
01654
01655 fileName.Left(&fileName, index);
01656 }
01657 else
01658 {
01659 fileName.Remove(index, searchString.Length());
01660 }
01661 TempPath.SetFileName(fileName);
01662 *DefaultName = TempPath.GetPath();
01663 }
01664 }
01665 }
01666
01667 return TRUE;
01668 }
01669
01670
01671
01672
01673
01674
01675
01676
01677
01678
01679
01680
01681
01682 OpState OpMenuExport::GetState(String_256 * pUIDescription, OpDescriptor * pOpDesc)
01683 {
01684
01685
01686
01687
01688
01689
01690
01691
01692
01693
01694
01695
01696
01697
01698
01699
01700
01701
01702
01703
01704
01705
01706
01707
01708
01709
01710
01711
01712
01713
01714
01715
01716
01717
01718
01719
01720
01721
01722
01723
01724
01725
01726
01727
01728
01729
01730
01731 OpState OpSt;
01732
01733 return OpSt;
01734
01735 }
01736
01737
01738
01739
01740
01741
01742
01743
01744
01745
01746
01747
01748
01749
01750
01751
01752
01753 BOOL OpDroppedFile::Init()
01754 {
01755 if (!RegisterOpDescriptor(0,
01756 _R(IDT_IMPORT),
01757 CC_RUNTIME_CLASS(OpDroppedFile),
01758 OPTOKEN_DROPPEDFILE,
01759 GetState,
01760 0,
01761 0,
01762 0))
01763 return FALSE;
01764
01765 return TRUE;
01766 }
01767
01768
01769
01770
01771
01772
01773
01774
01775
01776
01777
01778
01779
01780
01781
01782 #define PATH_BUF_SIZE (256)
01783
01784 void OpDroppedFile::DoWithParam(OpDescriptor*, OpParam* pOpParam)
01785 {
01786
01787 FileDropInfo* pFileInfo = (FileDropInfo*) pOpParam;
01788 List* pFileList = pFileInfo->GetFileList();
01789
01790 #ifdef XAR_TREE_DIALOG
01791 CXFTreeDlg* pCXFTreeDlg = CXFTreeDlg::GetCurrentCXFTreeDlg();
01792 if (pCXFTreeDlg != 0)
01793 {
01794 StringListItem* pItem = (StringListItem*)(pFileList->GetHead());
01795 if (pItem)
01796 pCXFTreeDlg->ShowFile((TCHAR*)(pItem->GetString()));
01797
01798 End();
01799 return;
01800 }
01801 #endif
01802
01803 #if FALSE
01804 #if _DEBUG
01805 CMXTreeDlg* pCMXTreeDlg = CMXTreeDlg::GetCurrentCMXTreeDlg();
01806 if (pCMXTreeDlg != 0)
01807 {
01808 char PathBuf[PATH_BUF_SIZE];
01809 PathBuf[0] = 0;
01810
01811
01812 UINT32 cBytes = DragQueryFile(hDrop, 0, PathBuf, PATH_BUF_SIZE);
01813
01814 pCMXTreeDlg->ShowFile(PathBuf);
01815
01816 End();
01817 return;
01818 }
01819 #endif
01820 #endif
01821
01822 GenericFilter *pGenericFilter = Filter::GetGenericFilter();
01823
01824 if (pGenericFilter == 0)
01825 {
01826 InformError(_R(IDT_CANT_FIND_FILTER));
01827 FailAndExecute();
01828 End();
01829 return;
01830 }
01831
01832
01833 DocView *pDocView = DocView::GetCurrent();
01834
01835 if (pDocView == 0)
01836 {
01837 ERROR3("No current DocView while procesing drag'n'drop!");
01838
01839
01840 InformError(_R(IDT_CANT_FIND_FILTER));
01841 FailAndExecute();
01842 End();
01843
01844 return;
01845 }
01846
01847
01848 WinCoord DropPoint = pFileInfo->GetDropPoint();
01849
01850
01851
01852 OilCoord OilPos = DropPoint.ToOil(pDocView);
01853
01854
01855 ImportPosition Pos;
01856
01857 Pos.pSpread = pDocView->FindEnclosingSpread(OilPos);
01858 if (Pos.pSpread == 0)
01859 {
01860 ERROR3("Could not find spread in which the drag'n'drop happened");
01861
01862
01863 InformError(_R(IDT_CANT_FIND_FILTER));
01864 FailAndExecute();
01865 End();
01866 return;
01867 }
01868
01869
01870 Pos.Position = OilPos.ToDoc(Pos.pSpread, pDocView);
01871
01872
01873 Pos.pSpread->DocCoordToSpreadCoord(&Pos.Position);
01874
01875
01876
01877 UINT32 cFiles = pFileList->GetCount();
01878
01879 StringListItem* pItem = (StringListItem*)(pFileList->GetHead());
01880
01881
01882 for (UINT32 iFile = 0; iFile < cFiles; iFile++)
01883 {
01884
01885
01886
01887
01888
01889
01890 String_256 Str = pItem->GetString();
01891
01892
01893
01894
01895
01896
01897
01898
01899
01900 {
01901
01902
01903 PathName Path(Str);
01904
01905 if ( !Path.IsValid() )
01906 {
01907
01908 InformError();
01909 FailAndExecute();
01910 End();
01911 return;
01912 }
01913
01914
01915 CCDiskFile DiskFile(1024, FALSE, TRUE);
01916
01917
01918 Document* pCurDoc = Document::GetCurrent();
01919
01920 try
01921 {
01922 if (!DiskFile.open(Path, ios::in | ios::binary))
01923 {
01924
01925 TRACEUSER( "Rik", _T("Failed to open file in MenuImport Do"));
01926 InformError(_R(IDT_IMPORT_NOTFOUND));
01927 FailAndExecute();
01928 End();
01929 return;
01930 }
01931
01932
01933 if (!pGenericFilter->DoImport(this, &DiskFile, pCurDoc, FALSE, &Pos))
01934 {
01935
01936
01937 if (Error::GetErrorNumber() != _R(IDN_USER_CANCELLED))
01938 InformError();
01939 else
01940 Error::ClearError();
01941 FailAndExecute();
01942 End();
01943
01944
01945 if (DiskFile.isOpen())
01946 DiskFile.close();
01947
01948 return;
01949 }
01950
01951
01952 if (DiskFile.isOpen())
01953 DiskFile.close();
01954
01955 }
01956
01957
01958 catch(CFileException e)
01959 {
01960
01961 if (Error::GetErrorNumber() != _R(IDN_USER_CANCELLED))
01962 InformError();
01963 else
01964 Error::ClearError();
01965
01966
01967 try
01968 {
01969 if (DiskFile.isOpen())
01970 DiskFile.close();
01971 }
01972 catch(CFileException e)
01973 {
01974
01975 }
01976
01977
01978 FailAndExecute();
01979
01980 }
01981 }
01982
01983
01984 pItem = (StringListItem*)(pFileList->GetNext(pItem));
01985 }
01986
01987
01988 End();
01989
01990 return;
01991 }
01992
01993
01994
01995
01996
01997
01998
01999
02000
02001
02002
02003
02004
02005 OpState OpDroppedFile::GetState(String_256*, OpDescriptor*)
02006 {
02007 OpState OpSt;
02008
02009 return OpSt;
02010 }
02011
02012
02013
02014
02015
02016
02017
02018
02019
02020
02021
02022
02023
02024 BitmapExportParam::BitmapExportParam(): OpParam(0, 0)
02025 {
02026 m_pBmpDlgParam = 0;
02027 }
02028
02029
02030
02031
02032
02033
02034
02035
02036
02037
02038
02039
02040
02041 BitmapExportParam::BitmapExportParam(UINT32 Count, KernelBitmap** pBitmap, BmpDlgParam* pParam) :
02042 OpParam((INT32)Count, (void *)pBitmap)
02043 {
02044 ERROR3IF(Count==0, "Zero bitmap count, that's not right");
02045 ERROR3IF(pBitmap==0, "0 bitmap array");
02046 ERROR3IF(!(*pBitmap)->IS_KIND_OF(KernelBitmap), "This dosen't seem to be an array of kernel bitmaps");
02047
02048
02049 SetBmpDlgParam(pParam);
02050 }
02051
02052
02053
02054
02055
02056
02057
02058
02059
02060
02061
02062
02063
02064 UINT32 BitmapExportParam::GetBitmapCount()
02065 {
02066 return (UINT32)Param1;
02067 }
02068
02069
02070
02071
02072
02073
02074
02075
02076
02077
02078
02079
02080
02081 KernelBitmap* BitmapExportParam::GetBitmap(UINT32 Index)
02082 {
02083 ERROR2IF(Index>=(UINT32)Param1, 0, "Index out of bounds");
02084 ERROR2IF(Param2==0, 0, "0 array");
02085
02086 ERROR3IF( !( ( (KernelBitmap**)(void *)Param2 )[Index])->IS_KIND_OF(KernelBitmap), "This dosen't seem to be a pointer to a kernel bitmap");
02087 return( (KernelBitmap**)(void *)Param2 )[Index];
02088 }
02089
02090
02091
02092
02093
02094
02095
02096
02097
02098
02099
02100
02101 BOOL BitmapExportParam::SetBmpDlgParam(BmpDlgParam* pParam)
02102 {
02103 ERROR2IF(pParam == 0,FALSE, "pParam is 0");
02104 m_pBmpDlgParam = pParam;
02105 return TRUE;
02106 }
02107
02108