LCOV - code coverage report
Current view: top level - libreoffice/filter/source/flash - impswfdialog.cxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 0 36 0.0 %
Date: 2012-12-27 Functions: 0 6 0.0 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
       2             : /*
       3             :  * This file is part of the LibreOffice project.
       4             :  *
       5             :  * This Source Code Form is subject to the terms of the Mozilla Public
       6             :  * License, v. 2.0. If a copy of the MPL was not distributed with this
       7             :  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
       8             :  *
       9             :  * This file incorporates work covered by the following license notice:
      10             :  *
      11             :  *   Licensed to the Apache Software Foundation (ASF) under one or more
      12             :  *   contributor license agreements. See the NOTICE file distributed
      13             :  *   with this work for additional information regarding copyright
      14             :  *   ownership. The ASF licenses this file to you under the Apache
      15             :  *   License, Version 2.0 (the "License"); you may not use this file
      16             :  *   except in compliance with the License. You may obtain a copy of
      17             :  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
      18             :  */
      19             : 
      20             : 
      21             : #include "impswfdialog.hxx"
      22             : #include "impswfdialog.hrc"
      23             : 
      24             : using namespace com::sun::star::uno;
      25             : using namespace com::sun::star::beans;
      26             : 
      27             : using ::rtl::OUString;
      28             : 
      29             : // ----------------
      30             : // - ImpPDFDialog -
      31             : // ----------------
      32             : 
      33           0 : ImpSWFDialog::ImpSWFDialog( Window* pParent, ResMgr& rResMgr, Sequence< PropertyValue >& rFilterData ) :
      34             :     ModalDialog( pParent, ResId( DLG_OPTIONS, rResMgr ) ),
      35             :     maFiDescr( this, ResId( FI_DESCR, rResMgr ) ),
      36             :     maNumFldQuality( this, ResId( NUM_FLD_QUALITY, rResMgr ) ),
      37             :     maFiExportAllDescr( this, ResId( FI_EXPORT_ALL_DESCR, rResMgr ) ),
      38             :     maCheckExportAll( this, ResId( BOOL_EXPORT_ALL, rResMgr ) ),
      39             :     maFiExportBackgroundsDescr( this, ResId( FI_EXPORT_BACKGROUNDS_DESCR, rResMgr ) ),
      40             :     maCheckExportBackgrounds( this, ResId( BOOL_EXPORT_BACKGROUNDS, rResMgr ) ),
      41             :     maFiExportBackgroundObjectsDescr( this, ResId( FI_EXPORT_BACKGROUND_OBJECTS_DESCR, rResMgr ) ),
      42             :     maCheckExportBackgroundObjects( this, ResId( BOOL_EXPORT_BACKGROUND_OBJECTS, rResMgr ) ),
      43             :     maFiExportSlideContentsDescr( this, ResId( FI_EXPORT_SLIDE_CONTENTS_DESCR, rResMgr ) ),
      44             :     maCheckExportSlideContents( this, ResId( BOOL_EXPORT_SLIDE_CONTENTS, rResMgr ) ),
      45             :     maFiExportSoundDescr( this, ResId( FI_EXPORT_SOUND_DESCR, rResMgr ) ),
      46             :     maCheckExportSound( this, ResId( BOOL_EXPORT_SOUND, rResMgr ) ),
      47             :     maFiExportOLEAsJPEGDescr( this, ResId( FI_EXPORT_OLE_AS_JPEG_DESCR, rResMgr ) ),
      48             :     maCheckExportOLEAsJPEG( this, ResId( BOOL_EXPORT_OLE_AS_JPEG, rResMgr ) ),
      49             :     maFiExportMultipleFilesDescr( this, ResId( FI_EXPORT_MULTIPLE_FILES_DESCR, rResMgr ) ),
      50             :     maCheckExportMultipleFiles( this, ResId( BOOL_EXPORT_MULTIPLE_FILES, rResMgr ) ),
      51             : 
      52             :     maBtnOK( this, ResId( BTN_OK, rResMgr ) ),
      53             :     maBtnCancel( this, ResId( BTN_CANCEL, rResMgr ) ),
      54             :     maBtnHelp( this, ResId( BTN_HELP, rResMgr ) ),
      55           0 :     maConfigItem( String( RTL_CONSTASCII_USTRINGPARAM( "Office.Common/Filter/Flash/Export/" ) ), &rFilterData )
      56             : {
      57           0 :     const sal_uLong nCompressMode = maConfigItem.ReadInt32( String( RTL_CONSTASCII_USTRINGPARAM( "CompressMode" ) ), 75 );
      58           0 :     maNumFldQuality.SetValue( nCompressMode );
      59             : 
      60           0 :     maCheckExportAll.Check();
      61           0 :     maCheckExportSlideContents.Check();
      62           0 :     maCheckExportSound.Check();
      63             : 
      64           0 :     maCheckExportAll.SetToggleHdl( LINK( this, ImpSWFDialog, OnToggleCheckbox ) );
      65             : 
      66           0 :     maCheckExportBackgrounds.Disable(); maFiExportBackgroundsDescr.Disable();
      67           0 :     maCheckExportBackgroundObjects.Disable(); maFiExportBackgroundObjectsDescr.Disable();
      68           0 :     maCheckExportSlideContents.Disable(); maFiExportSlideContentsDescr.Disable();
      69             : 
      70             : #ifdef AUGUSTUS
      71             :     maCheckExportMultipleFiles.Check();
      72             : #endif
      73             : 
      74           0 :     FreeResource();
      75           0 : }
      76             : 
      77             : // -----------------------------------------------------------------------------
      78             : 
      79           0 : ImpSWFDialog::~ImpSWFDialog()
      80             : {
      81           0 : }
      82             : 
      83             : // -----------------------------------------------------------------------------
      84             : 
      85           0 : Sequence< PropertyValue > ImpSWFDialog::GetFilterData()
      86             : {
      87           0 :     sal_Int32 nCompressMode = (sal_Int32)maNumFldQuality.GetValue();
      88           0 :     maConfigItem.WriteInt32( OUString( RTL_CONSTASCII_USTRINGPARAM( "CompressMode" ) ), nCompressMode );
      89           0 :     maConfigItem.WriteBool( OUString( RTL_CONSTASCII_USTRINGPARAM( "ExportAll" ) ), maCheckExportAll.IsChecked() );
      90           0 :     maConfigItem.WriteBool( OUString( RTL_CONSTASCII_USTRINGPARAM( "ExportBackgrounds" ) ), maCheckExportBackgrounds.IsChecked() );
      91           0 :     maConfigItem.WriteBool( OUString( RTL_CONSTASCII_USTRINGPARAM( "ExportBackgroundObjects" ) ), maCheckExportBackgroundObjects.IsChecked() );
      92           0 :     maConfigItem.WriteBool( OUString( RTL_CONSTASCII_USTRINGPARAM( "ExportSlideContents" ) ), maCheckExportSlideContents.IsChecked() );
      93           0 :     maConfigItem.WriteBool( OUString( RTL_CONSTASCII_USTRINGPARAM( "ExportSound" ) ), maCheckExportSound.IsChecked() );
      94           0 :     maConfigItem.WriteBool( OUString( RTL_CONSTASCII_USTRINGPARAM( "ExportOLEAsJPEG" ) ), maCheckExportOLEAsJPEG.IsChecked() );
      95           0 :     maConfigItem.WriteBool( OUString( RTL_CONSTASCII_USTRINGPARAM( "ExportMultipleFiles" ) ), maCheckExportMultipleFiles.IsChecked() );
      96             : 
      97           0 :     Sequence< PropertyValue > aRet( maConfigItem.GetFilterData() );
      98             : 
      99           0 :     return aRet;
     100             : }
     101             : 
     102             : // AS: This is called whenever the user toggles one of the checkboxes
     103           0 : IMPL_LINK( ImpSWFDialog, OnToggleCheckbox, CheckBox*, pBox )
     104             : {
     105           0 :     if (pBox == &maCheckExportAll)
     106             :     {
     107           0 :         maCheckExportBackgrounds.Enable(!maCheckExportBackgrounds.IsEnabled());
     108           0 :         maFiExportBackgroundsDescr.Enable(!maFiExportBackgroundsDescr.IsEnabled());
     109           0 :         maCheckExportBackgroundObjects.Enable(!maCheckExportBackgroundObjects.IsEnabled());
     110           0 :         maFiExportBackgroundObjectsDescr.Enable(!maFiExportBackgroundObjectsDescr.IsEnabled());
     111           0 :         maCheckExportSlideContents.Enable(!maCheckExportSlideContents.IsEnabled());
     112           0 :         maFiExportSlideContentsDescr.Enable(!maFiExportSlideContentsDescr.IsEnabled());
     113             :     }
     114             : 
     115           0 :     return 0;
     116             : }
     117             : 
     118             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10