Kaydet (Commit) 191dc43f authored tarafından Laurent Balland-Poirier's avatar Laurent Balland-Poirier Kaydeden (comit) Caolán McNamara

Convert ImpSWFDialog.src to ui

add ui file

Change-Id: I42af9b8969a07b4d738c1fd30fc8917f24f784c6
Reviewed-on: https://gerrit.libreoffice.org/6592Reviewed-by: 's avatarCaolán McNamara <caolanm@redhat.com>
Tested-by: 's avatarCaolán McNamara <caolanm@redhat.com>
üst 4281f845
#
# This file is part of the LibreOffice project.
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
#
# This file incorporates work covered by the following license notice:
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed
# with this work for additional information regarding copyright
# ownership. The ASF licenses this file to you under the Apache
# License, Version 2.0 (the "License"); you may not use this file
# except in compliance with the License. You may obtain a copy of
# the License at http://www.apache.org/licenses/LICENSE-2.0 .
#
$(eval $(call gb_AllLangResTarget_AllLangResTarget,flash))
$(eval $(call gb_AllLangResTarget_add_srs,flash,\
filter/flash \
))
$(eval $(call gb_SrsTarget_SrsTarget,filter/flash))
$(eval $(call gb_SrsTarget_add_files,filter/flash,\
filter/source/flash/impswfdialog.src \
))
# vim: set noet sw=4 ts=4:
...@@ -20,7 +20,6 @@ $(eval $(call gb_Module_Module,filter)) ...@@ -20,7 +20,6 @@ $(eval $(call gb_Module_Module,filter))
$(eval $(call gb_Module_add_targets,filter,\ $(eval $(call gb_Module_add_targets,filter,\
AllLangResTarget_eps \ AllLangResTarget_eps \
AllLangResTarget_flash \
AllLangResTarget_pdffilter \ AllLangResTarget_pdffilter \
AllLangResTarget_t602filter \ AllLangResTarget_t602filter \
AllLangResTarget_xsltdlg \ AllLangResTarget_xsltdlg \
......
...@@ -10,6 +10,7 @@ ...@@ -10,6 +10,7 @@
$(eval $(call gb_UIConfig_UIConfig,filter)) $(eval $(call gb_UIConfig_UIConfig,filter))
$(eval $(call gb_UIConfig_add_uifiles,filter,\ $(eval $(call gb_UIConfig_add_uifiles,filter,\
filter/uiconfig/ui/impswfdialog \
filter/uiconfig/ui/pdfgeneralpage \ filter/uiconfig/ui/pdfgeneralpage \
filter/uiconfig/ui/pdflinkspage \ filter/uiconfig/ui/pdflinkspage \
filter/uiconfig/ui/pdfoptionsdialog \ filter/uiconfig/ui/pdfoptionsdialog \
......
...@@ -19,7 +19,6 @@ ...@@ -19,7 +19,6 @@
#include "impswfdialog.hxx" #include "impswfdialog.hxx"
#include "impswfdialog.hrc"
using namespace com::sun::star::uno; using namespace com::sun::star::uno;
using namespace com::sun::star::beans; using namespace com::sun::star::beans;
...@@ -29,48 +28,36 @@ using namespace com::sun::star::beans; ...@@ -29,48 +28,36 @@ using namespace com::sun::star::beans;
// - ImpPDFDialog - // - ImpPDFDialog -
// ---------------- // ----------------
ImpSWFDialog::ImpSWFDialog( Window* pParent, ResMgr& rResMgr, Sequence< PropertyValue >& rFilterData ) : ImpSWFDialog::ImpSWFDialog( Window* pParent, Sequence< PropertyValue >& rFilterData ) :
ModalDialog( pParent, ResId( DLG_OPTIONS, rResMgr ) ), ModalDialog( pParent, "ImpSWFDialog", "filter/ui/impswfdialog.ui" ),
maFiDescr( this, ResId( FI_DESCR, rResMgr ) ),
maNumFldQuality( this, ResId( NUM_FLD_QUALITY, rResMgr ) ),
maFiExportAllDescr( this, ResId( FI_EXPORT_ALL_DESCR, rResMgr ) ),
maCheckExportAll( this, ResId( BOOL_EXPORT_ALL, rResMgr ) ),
maFiExportBackgroundsDescr( this, ResId( FI_EXPORT_BACKGROUNDS_DESCR, rResMgr ) ),
maCheckExportBackgrounds( this, ResId( BOOL_EXPORT_BACKGROUNDS, rResMgr ) ),
maFiExportBackgroundObjectsDescr( this, ResId( FI_EXPORT_BACKGROUND_OBJECTS_DESCR, rResMgr ) ),
maCheckExportBackgroundObjects( this, ResId( BOOL_EXPORT_BACKGROUND_OBJECTS, rResMgr ) ),
maFiExportSlideContentsDescr( this, ResId( FI_EXPORT_SLIDE_CONTENTS_DESCR, rResMgr ) ),
maCheckExportSlideContents( this, ResId( BOOL_EXPORT_SLIDE_CONTENTS, rResMgr ) ),
maFiExportSoundDescr( this, ResId( FI_EXPORT_SOUND_DESCR, rResMgr ) ),
maCheckExportSound( this, ResId( BOOL_EXPORT_SOUND, rResMgr ) ),
maFiExportOLEAsJPEGDescr( this, ResId( FI_EXPORT_OLE_AS_JPEG_DESCR, rResMgr ) ),
maCheckExportOLEAsJPEG( this, ResId( BOOL_EXPORT_OLE_AS_JPEG, rResMgr ) ),
maFiExportMultipleFilesDescr( this, ResId( FI_EXPORT_MULTIPLE_FILES_DESCR, rResMgr ) ),
maCheckExportMultipleFiles( this, ResId( BOOL_EXPORT_MULTIPLE_FILES, rResMgr ) ),
maBtnOK( this, ResId( BTN_OK, rResMgr ) ),
maBtnCancel( this, ResId( BTN_CANCEL, rResMgr ) ),
maBtnHelp( this, ResId( BTN_HELP, rResMgr ) ),
maConfigItem( "Office.Common/Filter/Flash/Export/", &rFilterData ) maConfigItem( "Office.Common/Filter/Flash/Export/", &rFilterData )
{ {
get(mpNumFldQuality,"quality");
get(mpCheckExportAll,"exportall");
get(mpCheckExportMultipleFiles,"exportmultiplefiles");
get(mpCheckExportBackgrounds,"exportbackgrounds");
get(mpCheckExportBackgroundObjects,"exportbackgroundobjects");
get(mpCheckExportSlideContents,"exportslidecontents");
get(mpCheckExportSound,"exportsound");
get(mpCheckExportOLEAsJPEG,"exportoleasjpeg");
const sal_uLong nCompressMode = maConfigItem.ReadInt32( "CompressMode", 75 ); const sal_uLong nCompressMode = maConfigItem.ReadInt32( "CompressMode", 75 );
maNumFldQuality.SetValue( nCompressMode ); mpNumFldQuality->SetValue( nCompressMode );
maCheckExportAll.Check(); mpCheckExportAll->Check();
maCheckExportSlideContents.Check(); mpCheckExportSlideContents->Check();
maCheckExportSound.Check(); mpCheckExportSound->Check();
maCheckExportAll.SetToggleHdl( LINK( this, ImpSWFDialog, OnToggleCheckbox ) ); mpCheckExportAll->SetToggleHdl( LINK( this, ImpSWFDialog, OnToggleCheckbox ) );
maCheckExportBackgrounds.Disable(); maFiExportBackgroundsDescr.Disable(); mpCheckExportBackgrounds->Disable();
maCheckExportBackgroundObjects.Disable(); maFiExportBackgroundObjectsDescr.Disable(); mpCheckExportBackgroundObjects->Disable();
maCheckExportSlideContents.Disable(); maFiExportSlideContentsDescr.Disable(); mpCheckExportSlideContents->Disable();
#ifdef AUGUSTUS #ifdef AUGUSTUS
maCheckExportMultipleFiles.Check(); mpCheckExportMultipleFiles->Check();
#endif #endif
FreeResource();
} }
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
...@@ -83,15 +70,15 @@ ImpSWFDialog::~ImpSWFDialog() ...@@ -83,15 +70,15 @@ ImpSWFDialog::~ImpSWFDialog()
Sequence< PropertyValue > ImpSWFDialog::GetFilterData() Sequence< PropertyValue > ImpSWFDialog::GetFilterData()
{ {
sal_Int32 nCompressMode = (sal_Int32)maNumFldQuality.GetValue(); sal_Int32 nCompressMode = (sal_Int32)mpNumFldQuality->GetValue();
maConfigItem.WriteInt32( "CompressMode" , nCompressMode ); maConfigItem.WriteInt32( "CompressMode" , nCompressMode );
maConfigItem.WriteBool( "ExportAll", maCheckExportAll.IsChecked() ); maConfigItem.WriteBool( "ExportAll", mpCheckExportAll->IsChecked() );
maConfigItem.WriteBool( "ExportBackgrounds", maCheckExportBackgrounds.IsChecked() ); maConfigItem.WriteBool( "ExportBackgrounds", mpCheckExportBackgrounds->IsChecked() );
maConfigItem.WriteBool( "ExportBackgroundObjects", maCheckExportBackgroundObjects.IsChecked() ); maConfigItem.WriteBool( "ExportBackgroundObjects", mpCheckExportBackgroundObjects->IsChecked() );
maConfigItem.WriteBool( "ExportSlideContents", maCheckExportSlideContents.IsChecked() ); maConfigItem.WriteBool( "ExportSlideContents", mpCheckExportSlideContents->IsChecked() );
maConfigItem.WriteBool( "ExportSound", maCheckExportSound.IsChecked() ); maConfigItem.WriteBool( "ExportSound", mpCheckExportSound->IsChecked() );
maConfigItem.WriteBool( "ExportOLEAsJPEG", maCheckExportOLEAsJPEG.IsChecked() ); maConfigItem.WriteBool( "ExportOLEAsJPEG", mpCheckExportOLEAsJPEG->IsChecked() );
maConfigItem.WriteBool( "ExportMultipleFiles", maCheckExportMultipleFiles.IsChecked() ); maConfigItem.WriteBool( "ExportMultipleFiles", mpCheckExportMultipleFiles->IsChecked() );
Sequence< PropertyValue > aRet( maConfigItem.GetFilterData() ); Sequence< PropertyValue > aRet( maConfigItem.GetFilterData() );
...@@ -101,14 +88,11 @@ Sequence< PropertyValue > ImpSWFDialog::GetFilterData() ...@@ -101,14 +88,11 @@ Sequence< PropertyValue > ImpSWFDialog::GetFilterData()
// AS: This is called whenever the user toggles one of the checkboxes // AS: This is called whenever the user toggles one of the checkboxes
IMPL_LINK( ImpSWFDialog, OnToggleCheckbox, CheckBox*, pBox ) IMPL_LINK( ImpSWFDialog, OnToggleCheckbox, CheckBox*, pBox )
{ {
if (pBox == &maCheckExportAll) if (pBox == mpCheckExportAll)
{ {
maCheckExportBackgrounds.Enable(!maCheckExportBackgrounds.IsEnabled()); mpCheckExportBackgrounds->Enable(!mpCheckExportBackgrounds->IsEnabled());
maFiExportBackgroundsDescr.Enable(!maFiExportBackgroundsDescr.IsEnabled()); mpCheckExportBackgroundObjects->Enable(!mpCheckExportBackgroundObjects->IsEnabled());
maCheckExportBackgroundObjects.Enable(!maCheckExportBackgroundObjects.IsEnabled()); mpCheckExportSlideContents->Enable(!mpCheckExportSlideContents->IsEnabled());
maFiExportBackgroundObjectsDescr.Enable(!maFiExportBackgroundObjectsDescr.IsEnabled());
maCheckExportSlideContents.Enable(!maCheckExportSlideContents.IsEnabled());
maFiExportSlideContentsDescr.Enable(!maFiExportSlideContentsDescr.IsEnabled());
} }
return 0; return 0;
......
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
* This file is part of the LibreOffice project.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* This file incorporates work covered by the following license notice:
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed
* with this work for additional information regarding copyright
* ownership. The ASF licenses this file to you under the Apache
* License, Version 2.0 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
#define DLG_OPTIONS 1024
#define BTN_OK 1
#define BTN_CANCEL 1
#define BTN_HELP 1
#define FI_DESCR 1
#define FI_EXPORT_ALL_DESCR 2
#define FI_EXPORT_BACKGROUNDS_DESCR 3
#define FI_EXPORT_BACKGROUND_OBJECTS_DESCR 4
#define FI_EXPORT_SLIDE_CONTENTS_DESCR 5
#define FI_EXPORT_SOUND_DESCR 6
#define FI_EXPORT_OLE_AS_JPEG_DESCR 7
#define FI_EXPORT_MULTIPLE_FILES_DESCR 8
#define NUM_FLD_QUALITY 1
#define BOOL_EXPORT_ALL 1
#define BOOL_EXPORT_BACKGROUNDS 2
#define BOOL_EXPORT_BACKGROUND_OBJECTS 3
#define BOOL_EXPORT_SLIDE_CONTENTS 4
#define BOOL_EXPORT_SOUND 5
#define BOOL_EXPORT_OLE_AS_JPEG 6
#define BOOL_EXPORT_MULTIPLE_FILES 7
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
...@@ -41,33 +41,21 @@ class Window; ...@@ -41,33 +41,21 @@ class Window;
class ImpSWFDialog : public ModalDialog class ImpSWFDialog : public ModalDialog
{ {
private: private:
FixedInfo maFiDescr; NumericField * mpNumFldQuality;
NumericField maNumFldQuality; CheckBox * mpCheckExportAll;
FixedInfo maFiExportAllDescr; CheckBox * mpCheckExportBackgrounds;
CheckBox maCheckExportAll; CheckBox * mpCheckExportBackgroundObjects;
FixedInfo maFiExportBackgroundsDescr; CheckBox * mpCheckExportSlideContents;
CheckBox maCheckExportBackgrounds; CheckBox * mpCheckExportSound;
FixedInfo maFiExportBackgroundObjectsDescr; CheckBox * mpCheckExportOLEAsJPEG;
CheckBox maCheckExportBackgroundObjects; CheckBox * mpCheckExportMultipleFiles;
FixedInfo maFiExportSlideContentsDescr;
CheckBox maCheckExportSlideContents;
FixedInfo maFiExportSoundDescr;
CheckBox maCheckExportSound;
FixedInfo maFiExportOLEAsJPEGDescr;
CheckBox maCheckExportOLEAsJPEG;
FixedInfo maFiExportMultipleFilesDescr;
CheckBox maCheckExportMultipleFiles;
OKButton maBtnOK;
CancelButton maBtnCancel;
HelpButton maBtnHelp;
FilterConfigItem maConfigItem; FilterConfigItem maConfigItem;
DECL_LINK( OnToggleCheckbox, CheckBox* ); DECL_LINK( OnToggleCheckbox, CheckBox* );
public: public:
ImpSWFDialog( Window* pParent, ResMgr& rResMgr, ImpSWFDialog( Window* pParent,
com::sun::star::uno::Sequence< com::sun::star::beans::PropertyValue >& rFilterData ); com::sun::star::uno::Sequence< com::sun::star::beans::PropertyValue >& rFilterData );
~ImpSWFDialog(); ~ImpSWFDialog();
......
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
* This file is part of the LibreOffice project.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* This file incorporates work covered by the following license notice:
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed
* with this work for additional information regarding copyright
* ownership. The ASF licenses this file to you under the Apache
* License, Version 2.0 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
#include "impswfdialog.hrc"
ModalDialog DLG_OPTIONS
{
HelpID = "filter:ModalDialog:DLG_OPTIONS";
Size = MAP_APPFONT ( 200 , 200 ) ;
OutputSize = TRUE ;
SVLook = TRUE ;
Moveable = TRUE ;
Closeable = TRUE ;
Text [ en-US ] = "Macromedia Flash (SWF) Options" ;
FixedText FI_DESCR
{
Pos = MAP_APPFONT ( 12 , 14 ) ;
Size = MAP_APPFONT ( 81 , 16 ) ;
Text [ en-US ] = "1: min. quality\n100: max. quality" ;
};
NumericField NUM_FLD_QUALITY
{
HelpID = "filter:NumericField:DLG_OPTIONS:NUM_FLD_QUALITY";
Border = TRUE ;
Pos = MAP_APPFONT ( 12 , 33 ) ;
Size = MAP_APPFONT ( 50 , 12 ) ;
TabStop = TRUE ;
Spin = TRUE ;
Minimum = 1;
Maximum = 100 ;
StrictFormat = TRUE ;
Last = 100 ;
Repeat = TRUE ;
};
CheckBox BOOL_EXPORT_ALL
{
HelpID = "filter:CheckBox:DLG_OPTIONS:BOOL_EXPORT_ALL";
Pos = MAP_APPFONT ( 12 , 65 ) ;
Size = MAP_APPFONT ( 10 , 14 ) ;
TabStop = TRUE ;
};
FixedText FI_EXPORT_ALL_DESCR
{
Pos = MAP_APPFONT ( 25 , 65 ) ;
Size = MAP_APPFONT ( 150 , 16 ) ;
Text [ en-US ] = "Export All Slides (Uncheck exports current slide)" ;
};
CheckBox BOOL_EXPORT_MULTIPLE_FILES
{
HelpID = "filter:CheckBox:DLG_OPTIONS:BOOL_EXPORT_MULTIPLE_FILES";
Pos = MAP_APPFONT ( 12 , 80 ) ;
Size = MAP_APPFONT ( 10 , 14 ) ;
TabStop = TRUE ;
};
FixedText FI_EXPORT_MULTIPLE_FILES_DESCR
{
Pos = MAP_APPFONT ( 25 , 80 ) ;
Size = MAP_APPFONT ( 150 , 16 ) ;
Text [ en-US ] = "Export As Multiple Files" ;
};
CheckBox BOOL_EXPORT_BACKGROUNDS
{
HelpID = "filter:CheckBox:DLG_OPTIONS:BOOL_EXPORT_BACKGROUNDS";
Pos = MAP_APPFONT ( 22 , 95 ) ;
Size = MAP_APPFONT ( 10 , 14 ) ;
TabStop = TRUE ;
};
FixedText FI_EXPORT_BACKGROUNDS_DESCR
{
Pos = MAP_APPFONT ( 35 , 95 ) ;
Size = MAP_APPFONT ( 100 , 16 ) ;
Text [ en-US ] = "Export Backgrounds" ;
};
CheckBox BOOL_EXPORT_BACKGROUND_OBJECTS
{
HelpID = "filter:CheckBox:DLG_OPTIONS:BOOL_EXPORT_BACKGROUND_OBJECTS";
Pos = MAP_APPFONT ( 22 , 107) ;
Size = MAP_APPFONT ( 10 , 14 ) ;
TabStop = TRUE ;
};
FixedText FI_EXPORT_BACKGROUND_OBJECTS_DESCR
{
Pos = MAP_APPFONT ( 35 , 107) ;
Size = MAP_APPFONT ( 100 , 16 ) ;
Text [ en-US ] = "Export Background Objects" ;
};
CheckBox BOOL_EXPORT_SLIDE_CONTENTS
{
HelpID = "filter:CheckBox:DLG_OPTIONS:BOOL_EXPORT_SLIDE_CONTENTS";
Pos = MAP_APPFONT ( 22 , 119 ) ;
Size = MAP_APPFONT ( 10 , 14 ) ;
TabStop = TRUE ;
};
FixedText FI_EXPORT_SLIDE_CONTENTS_DESCR
{
Pos = MAP_APPFONT ( 35 , 119 ) ;
Size = MAP_APPFONT ( 100 , 16 ) ;
Text [ en-US ] = "Export Slide Contents" ;
};
CheckBox BOOL_EXPORT_SOUND
{
HelpID = "filter:CheckBox:DLG_OPTIONS:BOOL_EXPORT_SOUND";
Pos = MAP_APPFONT ( 12 , 134 ) ;
Size = MAP_APPFONT ( 10 , 14 ) ;
TabStop = TRUE ;
};
FixedText FI_EXPORT_SOUND_DESCR
{
Pos = MAP_APPFONT ( 25 , 134 ) ;
Size = MAP_APPFONT ( 100 , 16 ) ;
Text [ en-US ] = "Export Verilogix Slide Annotations" ;
};
CheckBox BOOL_EXPORT_OLE_AS_JPEG
{
HelpID = "filter:CheckBox:DLG_OPTIONS:BOOL_EXPORT_OLE_AS_JPEG";
Pos = MAP_APPFONT ( 12 , 146 ) ;
Size = MAP_APPFONT ( 10 , 14 ) ;
TabStop = TRUE ;
};
FixedText FI_EXPORT_OLE_AS_JPEG_DESCR
{
Pos = MAP_APPFONT ( 25 , 146 ) ;
Size = MAP_APPFONT ( 100 , 16 ) ;
Text [ en-US ] = "Export OLE Objects as JPEG images" ;
};
OKButton BTN_OK
{
Pos = MAP_APPFONT ( 12 , 180 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
TabStop = TRUE ;
DefButton = TRUE ;
};
CancelButton BTN_CANCEL
{
Pos = MAP_APPFONT ( 70 , 180 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
TabStop = TRUE ;
};
HelpButton BTN_HELP
{
Pos = MAP_APPFONT ( 140 , 180 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
TabStop = TRUE ;
};
};
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
...@@ -184,7 +184,7 @@ Dialog* SWFDialog::createDialog( Window* pParent ) ...@@ -184,7 +184,7 @@ Dialog* SWFDialog::createDialog( Window* pParent )
{ {
} }
*/ */
ImpSWFDialog* pDlg = new ImpSWFDialog( pParent, *mpResMgr, maFilterData ); ImpSWFDialog* pDlg = new ImpSWFDialog( pParent, maFilterData );
pRet = pDlg; pRet = pDlg;
} }
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment