1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*************************************************************************
4 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
6 * Copyright 2000, 2010 Oracle and/or its affiliates.
8 * OpenOffice.org - a multi-platform office productivity suite
10 * This file is part of OpenOffice.org.
12 * OpenOffice.org is free software: you can redistribute it and/or modify
13 * it under the terms of the GNU Lesser General Public License version 3
14 * only, as published by the Free Software Foundation.
16 * OpenOffice.org is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU Lesser General Public License version 3 for more details
20 * (a copy is included in the LICENSE file that accompanied this code).
22 * You should have received a copy of the GNU Lesser General Public License
23 * version 3 along with OpenOffice.org. If not, see
24 * <http://www.openoffice.org/license.html>
25 * for a copy of the LGPLv3 License.
27 ************************************************************************/
29 // MARKER(update_precomp.py): autogen include statement, do not remove
30 #include "precompiled_filter.hxx"
32 #include <tools/ref.hxx>
33 #include <svtools/FilterConfigItem.hxx>
34 #include <vcl/msgbox.hxx>
35 #include "dlgepbm.hxx"
36 #include "dlgepbm.hrc"
37 #include "strings.hrc"
39 /*************************************************************************
43 \************************************************************************/
45 DlgExportEPBM::DlgExportEPBM( FltCallDialogParameter
& rPara
) :
46 ModalDialog ( rPara
.pWindow
, ResId( DLG_EXPORT_EPBM
, *rPara
.pResMgr
) ),
47 rFltCallPara ( rPara
),
48 aGrpFormat ( this, ResId( GRP_FORMAT
, *rPara
.pResMgr
) ),
49 aRBRaw ( this, ResId( RB_RAW
, *rPara
.pResMgr
) ),
50 aRBASCII ( this, ResId( RB_ASCII
, *rPara
.pResMgr
) ),
51 aBtnOK ( this, ResId( BTN_OK
, *rPara
.pResMgr
) ),
52 aBtnCancel ( this, ResId( BTN_CANCEL
, *rPara
.pResMgr
) ),
53 aBtnHelp ( this, ResId( BTN_HELP
, *rPara
.pResMgr
) ),
54 pMgr ( rPara
.pResMgr
)
58 // Config-Parameter lesen
60 String
aFilterConfigPath( RTL_CONSTASCII_USTRINGPARAM( "Office.Common/Filter/Graphic/Export/PBM" ) );
61 pConfigItem
= new FilterConfigItem( aFilterConfigPath
, &rPara
.aFilterData
);
62 sal_Int32 nFormat
= pConfigItem
->ReadInt32( String( ResId( KEY_FORMAT
, *pMgr
) ), 1 );
68 aRBRaw
.Check( bCheck
);
70 aRBASCII
.Check( bCheck
);
72 aBtnOK
.SetClickHdl( LINK( this, DlgExportEPBM
, OK
) );
75 DlgExportEPBM::~DlgExportEPBM()
80 /*************************************************************************
82 |* Speichert eingestellte Werte in ini-Datei
84 \************************************************************************/
86 IMPL_LINK( DlgExportEPBM
, OK
, void *, EMPTYARG
)
89 // Config-Parameter schreiben
90 sal_Int32 nFormat
= 0;
91 if ( aRBASCII
.IsChecked() )
93 pConfigItem
->WriteInt32( String( ResId( KEY_FORMAT
, *pMgr
) ), nFormat
);
94 rFltCallPara
.aFilterData
= pConfigItem
->GetFilterData();
100 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */