LCOV - code coverage report
Current view: top level - filter/source/flash - impswfdialog.cxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 0 36 0.0 %
Date: 2012-08-25 Functions: 0 6 0.0 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 0 0 -

           Branch data     Line data    Source code
       1                 :            : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
       2                 :            :  /*************************************************************************
       3                 :            :  *
       4                 :            :  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
       5                 :            :  *
       6                 :            :  * Copyright 2000, 2010 Oracle and/or its affiliates.
       7                 :            :  *
       8                 :            :  * OpenOffice.org - a multi-platform office productivity suite
       9                 :            :  *
      10                 :            :  * This file is part of OpenOffice.org.
      11                 :            :  *
      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.
      15                 :            :  *
      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).
      21                 :            :  *
      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.
      26                 :            :  *
      27                 :            :  ************************************************************************/
      28                 :            : 
      29                 :            : 
      30                 :            : #include "impswfdialog.hxx"
      31                 :            : #include "impswfdialog.hrc"
      32                 :            : 
      33                 :            : using namespace com::sun::star::uno;
      34                 :            : using namespace com::sun::star::beans;
      35                 :            : 
      36                 :            : using ::rtl::OUString;
      37                 :            : 
      38                 :            : // ----------------
      39                 :            : // - ImpPDFDialog -
      40                 :            : // ----------------
      41                 :            : 
      42                 :          0 : ImpSWFDialog::ImpSWFDialog( Window* pParent, ResMgr& rResMgr, Sequence< PropertyValue >& rFilterData ) :
      43                 :            :     ModalDialog( pParent, ResId( DLG_OPTIONS, rResMgr ) ),
      44                 :            :     maFiDescr( this, ResId( FI_DESCR, rResMgr ) ),
      45                 :            :     maNumFldQuality( this, ResId( NUM_FLD_QUALITY, rResMgr ) ),
      46                 :            :     maFiExportAllDescr( this, ResId( FI_EXPORT_ALL_DESCR, rResMgr ) ),
      47                 :            :     maCheckExportAll( this, ResId( BOOL_EXPORT_ALL, rResMgr ) ),
      48                 :            :     maFiExportBackgroundsDescr( this, ResId( FI_EXPORT_BACKGROUNDS_DESCR, rResMgr ) ),
      49                 :            :     maCheckExportBackgrounds( this, ResId( BOOL_EXPORT_BACKGROUNDS, rResMgr ) ),
      50                 :            :     maFiExportBackgroundObjectsDescr( this, ResId( FI_EXPORT_BACKGROUND_OBJECTS_DESCR, rResMgr ) ),
      51                 :            :     maCheckExportBackgroundObjects( this, ResId( BOOL_EXPORT_BACKGROUND_OBJECTS, rResMgr ) ),
      52                 :            :     maFiExportSlideContentsDescr( this, ResId( FI_EXPORT_SLIDE_CONTENTS_DESCR, rResMgr ) ),
      53                 :            :     maCheckExportSlideContents( this, ResId( BOOL_EXPORT_SLIDE_CONTENTS, rResMgr ) ),
      54                 :            :     maFiExportSoundDescr( this, ResId( FI_EXPORT_SOUND_DESCR, rResMgr ) ),
      55                 :            :     maCheckExportSound( this, ResId( BOOL_EXPORT_SOUND, rResMgr ) ),
      56                 :            :     maFiExportOLEAsJPEGDescr( this, ResId( FI_EXPORT_OLE_AS_JPEG_DESCR, rResMgr ) ),
      57                 :            :     maCheckExportOLEAsJPEG( this, ResId( BOOL_EXPORT_OLE_AS_JPEG, rResMgr ) ),
      58                 :            :     maFiExportMultipleFilesDescr( this, ResId( FI_EXPORT_MULTIPLE_FILES_DESCR, rResMgr ) ),
      59                 :            :     maCheckExportMultipleFiles( this, ResId( BOOL_EXPORT_MULTIPLE_FILES, rResMgr ) ),
      60                 :            : 
      61                 :            :     maBtnOK( this, ResId( BTN_OK, rResMgr ) ),
      62                 :            :     maBtnCancel( this, ResId( BTN_CANCEL, rResMgr ) ),
      63                 :            :     maBtnHelp( this, ResId( BTN_HELP, rResMgr ) ),
      64                 :          0 :     maConfigItem( String( RTL_CONSTASCII_USTRINGPARAM( "Office.Common/Filter/Flash/Export/" ) ), &rFilterData )
      65                 :            : {
      66                 :          0 :     const sal_uLong nCompressMode = maConfigItem.ReadInt32( String( RTL_CONSTASCII_USTRINGPARAM( "CompressMode" ) ), 75 );
      67                 :          0 :     maNumFldQuality.SetValue( nCompressMode );
      68                 :            : 
      69                 :          0 :     maCheckExportAll.Check();
      70                 :          0 :     maCheckExportSlideContents.Check();
      71                 :          0 :     maCheckExportSound.Check();
      72                 :            : 
      73                 :          0 :     maCheckExportAll.SetToggleHdl( LINK( this, ImpSWFDialog, OnToggleCheckbox ) );
      74                 :            : 
      75                 :          0 :     maCheckExportBackgrounds.Disable(); maFiExportBackgroundsDescr.Disable();
      76                 :          0 :     maCheckExportBackgroundObjects.Disable(); maFiExportBackgroundObjectsDescr.Disable();
      77                 :          0 :     maCheckExportSlideContents.Disable(); maFiExportSlideContentsDescr.Disable();
      78                 :            : 
      79                 :            : #ifdef AUGUSTUS
      80                 :            :     maCheckExportMultipleFiles.Check();
      81                 :            : #endif
      82                 :            : 
      83                 :          0 :     FreeResource();
      84                 :          0 : }
      85                 :            : 
      86                 :            : // -----------------------------------------------------------------------------
      87                 :            : 
      88                 :          0 : ImpSWFDialog::~ImpSWFDialog()
      89                 :            : {
      90                 :          0 : }
      91                 :            : 
      92                 :            : // -----------------------------------------------------------------------------
      93                 :            : 
      94                 :          0 : Sequence< PropertyValue > ImpSWFDialog::GetFilterData()
      95                 :            : {
      96                 :          0 :     sal_Int32 nCompressMode = (sal_Int32)maNumFldQuality.GetValue();
      97                 :          0 :     maConfigItem.WriteInt32( OUString( RTL_CONSTASCII_USTRINGPARAM( "CompressMode" ) ), nCompressMode );
      98                 :          0 :     maConfigItem.WriteBool( OUString( RTL_CONSTASCII_USTRINGPARAM( "ExportAll" ) ), maCheckExportAll.IsChecked() );
      99                 :          0 :     maConfigItem.WriteBool( OUString( RTL_CONSTASCII_USTRINGPARAM( "ExportBackgrounds" ) ), maCheckExportBackgrounds.IsChecked() );
     100                 :          0 :     maConfigItem.WriteBool( OUString( RTL_CONSTASCII_USTRINGPARAM( "ExportBackgroundObjects" ) ), maCheckExportBackgroundObjects.IsChecked() );
     101                 :          0 :     maConfigItem.WriteBool( OUString( RTL_CONSTASCII_USTRINGPARAM( "ExportSlideContents" ) ), maCheckExportSlideContents.IsChecked() );
     102                 :          0 :     maConfigItem.WriteBool( OUString( RTL_CONSTASCII_USTRINGPARAM( "ExportSound" ) ), maCheckExportSound.IsChecked() );
     103                 :          0 :     maConfigItem.WriteBool( OUString( RTL_CONSTASCII_USTRINGPARAM( "ExportOLEAsJPEG" ) ), maCheckExportOLEAsJPEG.IsChecked() );
     104                 :          0 :     maConfigItem.WriteBool( OUString( RTL_CONSTASCII_USTRINGPARAM( "ExportMultipleFiles" ) ), maCheckExportMultipleFiles.IsChecked() );
     105                 :            : 
     106                 :          0 :     Sequence< PropertyValue > aRet( maConfigItem.GetFilterData() );
     107                 :            : 
     108                 :          0 :     return aRet;
     109                 :            : }
     110                 :            : 
     111                 :            : // AS: This is called whenever the user toggles one of the checkboxes
     112                 :          0 : IMPL_LINK( ImpSWFDialog, OnToggleCheckbox, CheckBox*, pBox )
     113                 :            : {
     114                 :          0 :     if (pBox == &maCheckExportAll)
     115                 :            :     {
     116                 :          0 :         maCheckExportBackgrounds.Enable(!maCheckExportBackgrounds.IsEnabled());
     117                 :          0 :         maFiExportBackgroundsDescr.Enable(!maFiExportBackgroundsDescr.IsEnabled());
     118                 :          0 :         maCheckExportBackgroundObjects.Enable(!maCheckExportBackgroundObjects.IsEnabled());
     119                 :          0 :         maFiExportBackgroundObjectsDescr.Enable(!maFiExportBackgroundObjectsDescr.IsEnabled());
     120                 :          0 :         maCheckExportSlideContents.Enable(!maCheckExportSlideContents.IsEnabled());
     121                 :          0 :         maFiExportSlideContentsDescr.Enable(!maFiExportSlideContentsDescr.IsEnabled());
     122                 :            :     }
     123                 :            : 
     124                 :          0 :     return 0;
     125                 :            : }
     126                 :            : 
     127                 :            : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10