LCOV - code coverage report
Current view: top level - sfx2/inc/sfx2 - basedlgs.hxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 2 13 15.4 %
Date: 2012-08-25 Functions: 1 10 10.0 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 0 2 0.0 %

           Branch data     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                 :            : #ifndef _BASEDLGS_HXX
      20                 :            : #define _BASEDLGS_HXX
      21                 :            : 
      22                 :            : #include "sal/config.h"
      23                 :            : #include "sfx2/dllapi.h"
      24                 :            : #include "sal/types.h"
      25                 :            : #include <vcl/floatwin.hxx>
      26                 :            : #include <vcl/timer.hxx>
      27                 :            : #include <vcl/dialog.hxx>
      28                 :            : 
      29                 :            : class TabPage;
      30                 :            : class SfxTabPage;
      31                 :            : class SfxBindings;
      32                 :            : class SfxChildWindow;
      33                 :            : struct SfxChildWinInfo;
      34                 :            : class SfxItemSet;
      35                 :            : class SfxItemPool;
      36                 :            : class OKButton;
      37                 :            : class CancelButton;
      38                 :            : class HelpButton;
      39                 :            : class Button;
      40                 :            : class FixedLine;
      41                 :            : 
      42                 :            : // class SfxModalDefParentHelper -----------------------------------------
      43                 :            : 
      44                 :            : class SfxModalDefParentHelper
      45                 :            : {
      46                 :            : private:
      47                 :            :     Window *pOld;
      48                 :            : 
      49                 :            : public:
      50                 :            :     SfxModalDefParentHelper(Window* pWindow);
      51                 :            :     ~SfxModalDefParentHelper();
      52                 :            : };
      53                 :            : 
      54                 :            : // class SfxModalDialog --------------------------------------------------
      55                 :            : 
      56                 :            : class SFX2_DLLPUBLIC SfxModalDialog: public ModalDialog
      57                 :            : {
      58                 :            :     sal_uInt32              nUniqId;
      59                 :            :     String                  aExtraData;
      60                 :            :     const SfxItemSet*       pInputSet;
      61                 :            :     SfxItemSet*             pOutputSet;
      62                 :            : 
      63                 :            : private:
      64                 :            :     SAL_DLLPRIVATE SfxModalDialog(SfxModalDialog &); // not defined
      65                 :            :     SAL_DLLPRIVATE void operator =(SfxModalDialog &); // not defined
      66                 :            : 
      67                 :            :     SAL_DLLPRIVATE void SetDialogData_Impl();
      68                 :            :     SAL_DLLPRIVATE void GetDialogData_Impl();
      69                 :            :     SAL_DLLPRIVATE void init();
      70                 :            : 
      71                 :            : protected:
      72                 :            :     SfxModalDialog(Window *pParent, const ResId& );
      73                 :            :     SfxModalDialog(Window* pParent, sal_uInt32 nUniqueId, WinBits nWinStyle = WB_STDMODAL );
      74                 :            : 
      75                 :          0 :     String&             GetExtraData()      { return aExtraData; }
      76                 :          0 :     sal_uInt32          GetUniqId() const   { return nUniqId; }
      77                 :            :     SfxItemSet*         GetItemSet()        { return pOutputSet; }
      78                 :            :     void                CreateOutputItemSet( SfxItemPool& rPool );
      79                 :            :     void                CreateOutputItemSet( const SfxItemSet& rInput );
      80                 :          0 :     void                SetInputSet( const SfxItemSet* pInSet ) { pInputSet = pInSet; }
      81                 :          0 :     SfxItemSet*         GetOutputSetImpl() { return pOutputSet; }
      82                 :            : 
      83                 :            : public:
      84                 :            :     ~SfxModalDialog();
      85                 :          0 :     const SfxItemSet*   GetOutputItemSet() const { return pOutputSet; }
      86                 :          0 :     const SfxItemSet*   GetInputItemSet() const { return pInputSet; }
      87                 :            : };
      88                 :            : 
      89                 :            : // class SfxModelessDialog --------------------------------------------------
      90                 :            : class SfxModelessDialog_Impl;
      91                 :            : class SFX2_DLLPUBLIC SfxModelessDialog: public ModelessDialog
      92                 :            : {
      93                 :            :     SfxBindings*            pBindings;
      94                 :            :     Size                    aSize;
      95                 :            :     SfxModelessDialog_Impl* pImp;
      96                 :            : 
      97                 :            :     SAL_DLLPRIVATE SfxModelessDialog(SfxModelessDialog &); // not defined
      98                 :            :     SAL_DLLPRIVATE void operator =(SfxModelessDialog &); // not defined
      99                 :            : 
     100                 :            : protected:
     101                 :            :                             SfxModelessDialog( SfxBindings*, SfxChildWindow*,
     102                 :            :                                 Window*, const ResId& );
     103                 :            :                             ~SfxModelessDialog();
     104                 :            :     virtual sal_Bool            Close();
     105                 :            :     virtual void            Resize();
     106                 :            :     virtual void            Move();
     107                 :            :     virtual void            StateChanged( StateChangedType nStateChange );
     108                 :            : 
     109                 :            : public:
     110                 :            :     virtual void            FillInfo(SfxChildWinInfo&) const;
     111                 :            :     void                    Initialize (SfxChildWinInfo* pInfo);
     112                 :            :     virtual long            Notify( NotifyEvent& rNEvt );
     113                 :          0 :     SfxBindings&            GetBindings()
     114                 :          0 :                             { return *pBindings; }
     115                 :            : 
     116                 :            :     DECL_LINK(TimerHdl, void *);
     117                 :            : 
     118                 :            : };
     119                 :            : 
     120                 :            : // class SfxFloatingWindow --------------------------------------------------
     121                 :            : class SfxFloatingWindow_Impl;
     122                 :            : class SFX2_DLLPUBLIC SfxFloatingWindow: public FloatingWindow
     123                 :            : {
     124                 :            :     SfxBindings*            pBindings;
     125                 :            :     Size                    aSize;
     126                 :            :     SfxFloatingWindow_Impl* pImp;
     127                 :            : 
     128                 :            :     SAL_DLLPRIVATE SfxFloatingWindow(SfxFloatingWindow &); // not defined
     129                 :            :     SAL_DLLPRIVATE void operator =(SfxFloatingWindow &); // not defined
     130                 :            : 
     131                 :            : protected:
     132                 :            :                             SfxFloatingWindow( SfxBindings *pBindings,
     133                 :            :                                               SfxChildWindow *pCW,
     134                 :            :                                               Window* pParent,
     135                 :            :                                               WinBits nWinBits=WB_STDMODELESS);
     136                 :            :                             SfxFloatingWindow( SfxBindings *pBindings,
     137                 :            :                                               SfxChildWindow *pCW,
     138                 :            :                                               Window* pParent,
     139                 :            :                                               const ResId& rResId);
     140                 :            :                             ~SfxFloatingWindow();
     141                 :            : 
     142                 :            :     virtual void            StateChanged( StateChangedType nStateChange );
     143                 :            :     virtual sal_Bool            Close();
     144                 :            :     virtual void            Resize();
     145                 :            :     virtual void            Move();
     146                 :            :     virtual long            Notify( NotifyEvent& rNEvt );
     147                 :         20 :     SfxBindings&            GetBindings()
     148                 :         20 :                             { return *pBindings; }
     149                 :            : 
     150                 :            : public:
     151                 :            :     virtual void            FillInfo(SfxChildWinInfo&) const;
     152                 :            :     void                    Initialize (SfxChildWinInfo* pInfo);
     153                 :            : 
     154                 :            :     DECL_LINK(TimerHdl, void *);
     155                 :            : 
     156                 :            : };
     157                 :            : 
     158                 :            : // class SfxSingleTabDialog --------------------------------------------------
     159                 :            : 
     160                 :          0 : struct SingleTabDlgImpl
     161                 :            : {
     162                 :            :     TabPage*                    m_pTabPage;
     163                 :            :     SfxTabPage*                 m_pSfxPage;
     164                 :            :     FixedLine*                  m_pLine;
     165                 :            :     String                      m_sInfoURL;
     166                 :            :     Link                        m_aInfoLink;
     167                 :            : 
     168                 :          0 :     SingleTabDlgImpl() :
     169         [ #  # ]:          0 :         m_pTabPage( NULL ), m_pSfxPage( NULL ), m_pLine( NULL ) {}
     170                 :            : };
     171                 :            : 
     172                 :            : typedef sal_uInt16* (*GetTabPageRanges)(); // liefert internationale Which-Werte
     173                 :            : 
     174                 :            : class SFX2_DLLPUBLIC SfxSingleTabDialog : public SfxModalDialog
     175                 :            : {
     176                 :            : public:
     177                 :            :     SfxSingleTabDialog( Window* pParent, const SfxItemSet& rOptionsSet, sal_uInt16 nUniqueId );
     178                 :            :     SfxSingleTabDialog( Window* pParent, sal_uInt16 nUniqueId, const SfxItemSet* pInSet = 0 );
     179                 :            : 
     180                 :            :     virtual             ~SfxSingleTabDialog();
     181                 :            : 
     182                 :            :     void                SetTabPage( SfxTabPage* pTabPage, GetTabPageRanges pRangesFunc = 0 );
     183                 :            :     SfxTabPage*         GetTabPage() const { return pImpl->m_pSfxPage; }
     184                 :            : 
     185                 :            :     OKButton*           GetOKButton() const { return pOKBtn; }
     186                 :            :     CancelButton*       GetCancelButton() const { return pCancelBtn; }
     187                 :            : 
     188                 :            : private:
     189                 :            :     GetTabPageRanges    fnGetRanges;
     190                 :            : 
     191                 :            :     OKButton*           pOKBtn;
     192                 :            :     CancelButton*       pCancelBtn;
     193                 :            :     HelpButton*         pHelpBtn;
     194                 :            : 
     195                 :            :     SingleTabDlgImpl*   pImpl;
     196                 :            : 
     197                 :            :     DECL_DLLPRIVATE_LINK(OKHdl_Impl, void *);
     198                 :            : };
     199                 :            : 
     200                 :            : #endif
     201                 :            : 
     202                 :            : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10