LCOV - code coverage report
Current view: top level - sw/source/ui/inc - redlndlg.hxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 0 7 0.0 %
Date: 2012-08-25 Functions: 0 9 0.0 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 0 6 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                 :            : #ifndef _SWREDLNDLG_HXX
      29                 :            : #define _SWREDLNDLG_HXX
      30                 :            : #include "swdllapi.h"
      31                 :            : #include "chldwrap.hxx"
      32                 :            : #include <redline.hxx>
      33                 :            : #include <tools/datetime.hxx>
      34                 :            : #include <vcl/msgbox.hxx>
      35                 :            : #include <svl/eitem.hxx>
      36                 :            : #include <sfx2/basedlgs.hxx>
      37                 :            : #include <sfx2/viewfrm.hxx>
      38                 :            : #include <sfx2/dispatch.hxx>
      39                 :            : #include <svx/ctredlin.hxx>
      40                 :            : #include <svx/postattr.hxx>
      41                 :            : #include <boost/ptr_container/ptr_vector.hpp>
      42                 :            : #include <o3tl/sorted_vector.hxx>
      43                 :            : 
      44                 :            : class SwChildWinWrapper;
      45                 :            : 
      46                 :            : struct SwRedlineDataChild
      47                 :            : {
      48                 :            :     const SwRedlineData*        pChild;     // link to original stacked data
      49                 :            :     const SwRedlineDataChild*   pNext;      // link to stacked data
      50                 :            :     SvLBoxEntry*                pTLBChild;  // corresponding TreeListBox entry
      51                 :            : };
      52                 :            : 
      53                 :          0 : struct SwRedlineDataParent
      54                 :            : {
      55                 :            :     const SwRedlineData*        pData;      // RedlineDataPtr
      56                 :            :     const SwRedlineDataChild*   pNext;      // link to stacked data
      57                 :            :     SvLBoxEntry*                pTLBParent; // corresponding TreeListBox entry
      58                 :            :     String                      sComment;   // redline comment
      59                 :            : 
      60                 :            :     inline sal_Bool operator==( const SwRedlineDataParent& rObj ) const
      61                 :            :                         { return (pData && pData->GetSeqNo() == rObj.pData->GetSeqNo()); }
      62                 :          0 :     inline sal_Bool operator< ( const SwRedlineDataParent& rObj ) const
      63 [ #  # ][ #  # ]:          0 :                         { return (pData && pData->GetSeqNo() <  rObj.pData->GetSeqNo()); }
      64                 :            : };
      65                 :            : 
      66                 :            : typedef boost::ptr_vector<SwRedlineDataParent> SwRedlineDataParentArr;
      67                 :            : 
      68                 :          0 : class SwRedlineDataParentSortArr : public o3tl::sorted_vector<SwRedlineDataParent*, o3tl::less_ptr_to<SwRedlineDataParent> > {};
      69                 :            : 
      70                 :            : 
      71                 :            : typedef SwRedlineDataChild* SwRedlineDataChildPtr;
      72                 :            : typedef boost::ptr_vector<SwRedlineDataChild> SwRedlineDataChildArr;
      73                 :            : 
      74                 :            : 
      75                 :            : typedef SvLBoxEntry* SvLBoxEntryPtr;
      76                 :            : typedef std::vector<SvLBoxEntryPtr> SvLBoxEntryArr;
      77                 :            : 
      78                 :            : class SW_DLLPUBLIC SwRedlineAcceptDlg
      79                 :            : {
      80                 :            :     Dialog*                 pParentDlg;
      81                 :            :     SwRedlineDataParentArr  aRedlineParents;
      82                 :            :     SwRedlineDataChildArr   aRedlineChildren;
      83                 :            :     SwRedlineDataParentSortArr aUsedSeqNo;
      84                 :            :     SvxAcceptChgCtr         aTabPagesCTRL;
      85                 :            :     PopupMenu               aPopup;
      86                 :            :     Timer                   aDeselectTimer;
      87                 :            :     Timer                   aSelectTimer;
      88                 :            :     String                  sInserted;
      89                 :            :     String                  sDeleted;
      90                 :            :     String                  sFormated;
      91                 :            :     String                  sTableChgd;
      92                 :            :     String                  sFmtCollSet;
      93                 :            :     String                  sFilterAction;
      94                 :            :     String                  sAutoFormat;
      95                 :            :     Size                    aBorderSz;
      96                 :            :     SvxTPView*              pTPView;
      97                 :            :     SvxRedlinTable*         pTable; // PB 2006/02/02 #i48648 now SvHeaderTabListBox
      98                 :            :     Link                    aOldSelectHdl;
      99                 :            :     Link                    aOldDeselectHdl;
     100                 :            :     sal_Bool                    bOnlyFormatedRedlines;
     101                 :            :     sal_Bool                    bHasReadonlySel;
     102                 :            :     sal_Bool                    bRedlnAutoFmt;
     103                 :            : 
     104                 :            :     // prevent update dialog data during longer operations (cf #102657#)
     105                 :            :     bool                    bInhibitActivate;
     106                 :            : 
     107                 :            :     SW_DLLPRIVATE DECL_LINK( AcceptHdl,     void* );
     108                 :            :     SW_DLLPRIVATE DECL_LINK( AcceptAllHdl,  void* );
     109                 :            :     SW_DLLPRIVATE DECL_LINK( RejectHdl,     void* );
     110                 :            :     SW_DLLPRIVATE DECL_LINK( RejectAllHdl,  void* );
     111                 :            :     SW_DLLPRIVATE DECL_LINK( UndoHdl,           void* );
     112                 :            :     SW_DLLPRIVATE DECL_LINK( DeselectHdl,       void* );
     113                 :            :     SW_DLLPRIVATE DECL_LINK( SelectHdl,     void* );
     114                 :            :     SW_DLLPRIVATE DECL_LINK( GotoHdl,           void* );
     115                 :            :     SW_DLLPRIVATE DECL_LINK( CommandHdl,        void* );
     116                 :            : 
     117                 :            :     SW_DLLPRIVATE sal_uInt16            CalcDiff(sal_uInt16 nStart, sal_Bool bChild);
     118                 :            :     SW_DLLPRIVATE void          InsertChildren(SwRedlineDataParent *pParent, const SwRedline& rRedln, const sal_uInt16 nAutoFmt);
     119                 :            :     SW_DLLPRIVATE void          InsertParents(sal_uInt16 nStart, sal_uInt16 nEnd = USHRT_MAX);
     120                 :            :     SW_DLLPRIVATE void          RemoveParents(sal_uInt16 nStart, sal_uInt16 nEnd);
     121                 :            :     SW_DLLPRIVATE void          InitAuthors();
     122                 :            : 
     123                 :            :     SW_DLLPRIVATE String            GetRedlineText(const SwRedline& rRedln, DateTime &rDateTime, sal_uInt16 nStack = 0);
     124                 :            :     SW_DLLPRIVATE const String& GetActionText(const SwRedline& rRedln, sal_uInt16 nStack = 0);
     125                 :            :     SW_DLLPRIVATE sal_uInt16            GetRedlinePos( const SvLBoxEntry& rEntry) const;
     126                 :            : 
     127                 :            : public:
     128                 :            :     SwRedlineAcceptDlg(Dialog *pParent, sal_Bool bAutoFmt = sal_False);
     129                 :            :     virtual ~SwRedlineAcceptDlg();
     130                 :            : 
     131                 :            :     DECL_LINK( FilterChangedHdl, void *pDummy = 0 );
     132                 :            : 
     133                 :          0 :     inline SvxAcceptChgCtr* GetChgCtrl()        { return &aTabPagesCTRL; }
     134                 :          0 :     inline sal_Bool     HasRedlineAutoFmt() const   { return bRedlnAutoFmt; }
     135                 :            : 
     136                 :            :     void            Init(sal_uInt16 nStart = 0);
     137                 :            :     void            CallAcceptReject( sal_Bool bSelect, sal_Bool bAccept );
     138                 :            : 
     139                 :            :     void            Initialize(const String &rExtraData);
     140                 :            :     void            FillInfo(String &rExtraData) const;
     141                 :            : 
     142                 :            :     virtual void    Activate();
     143                 :            :     virtual void    Resize();
     144                 :            : };
     145                 :            : 
     146                 :            : class SwModelessRedlineAcceptDlg : public SfxModelessDialog
     147                 :            : {
     148                 :            :     SwRedlineAcceptDlg*     pImplDlg;
     149                 :            :     SwChildWinWrapper*      pChildWin;
     150                 :            : 
     151                 :            :     virtual void    Resize();
     152                 :            : 
     153                 :            : public:
     154                 :            :     SwModelessRedlineAcceptDlg(SfxBindings*, SwChildWinWrapper*, Window *pParent);
     155                 :            :     ~SwModelessRedlineAcceptDlg();
     156                 :            : 
     157                 :            :     virtual void    Activate();
     158                 :            :     virtual void    FillInfo(SfxChildWinInfo&) const;
     159                 :            :     void            Initialize (SfxChildWinInfo* pInfo);
     160                 :            : };
     161                 :            : 
     162         [ #  # ]:          0 : class SwRedlineAcceptChild : public SwChildWinWrapper
     163                 :            : {
     164                 :            : public:
     165                 :            :     SwRedlineAcceptChild(   Window* ,
     166                 :            :                             sal_uInt16 nId,
     167                 :            :                             SfxBindings*,
     168                 :            :                             SfxChildWinInfo*  );
     169                 :            : 
     170                 :            :     SFX_DECL_CHILDWINDOW_WITHID( SwRedlineAcceptChild );
     171                 :            : 
     172                 :            :     virtual sal_Bool    ReInitDlg(SwDocShell *pDocSh);
     173                 :            : };
     174                 :            : 
     175                 :            : 
     176                 :            : #endif
     177                 :            : 
     178                 :            : 
     179                 :            : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10