LCOV - code coverage report
Current view: top level - sc/source/ui/view - reffact.cxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 17 132 12.9 %
Date: 2012-08-25 Functions: 34 97 35.1 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 17 648 2.6 %

           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                 :            : #include <sfx2/app.hxx>
      30                 :            : #include <sfx2/basedlgs.hxx>
      31                 :            : #include <sfx2/bindings.hxx>
      32                 :            : #include <sfx2/dispatch.hxx>
      33                 :            : #include <sfx2/viewfrm.hxx>
      34                 :            : 
      35                 :            : #include "reffact.hxx"
      36                 :            : #include "tabvwsh.hxx"
      37                 :            : #include "sc.hrc"
      38                 :            : #include "acredlin.hxx"
      39                 :            : #include "simpref.hxx"
      40                 :            : #include "scmod.hxx"
      41                 :            : #include "validate.hxx"
      42                 :            : 
      43                 :            : // -----------------------------------------------------------------------
      44                 :            : 
      45 [ #  # ][ +  - ]:        102 : SFX_IMPL_MODELESSDIALOG_WITHID(ScNameDlgWrapper, FID_DEFINE_NAME )
                 [ #  # ]
      46 [ #  # ][ +  - ]:        102 : SFX_IMPL_MODELESSDIALOG_WITHID(ScNameDefDlgWrapper, FID_ADD_NAME )
                 [ #  # ]
      47 [ #  # ][ +  - ]:        102 : SFX_IMPL_MODELESSDIALOG_WITHID(ScSolverDlgWrapper, SID_OPENDLG_SOLVE )
                 [ #  # ]
      48 [ #  # ][ +  - ]:        102 : SFX_IMPL_MODELESSDIALOG_WITHID(ScOptSolverDlgWrapper, SID_OPENDLG_OPTSOLVER )
                 [ #  # ]
      49 [ #  # ][ +  - ]:        102 : SFX_IMPL_MODELESSDIALOG_WITHID(ScPivotLayoutWrapper, SID_OPENDLG_PIVOTTABLE )
                 [ #  # ]
      50 [ #  # ][ +  - ]:        102 : SFX_IMPL_MODELESSDIALOG_WITHID(ScTabOpDlgWrapper, SID_OPENDLG_TABOP )
                 [ #  # ]
      51 [ #  # ][ +  - ]:        102 : SFX_IMPL_MODELESSDIALOG_WITHID(ScFilterDlgWrapper, SID_FILTER )
                 [ #  # ]
      52 [ #  # ][ +  - ]:        102 : SFX_IMPL_MODELESSDIALOG_WITHID(ScSpecialFilterDlgWrapper, SID_SPECIAL_FILTER )
                 [ #  # ]
      53 [ #  # ][ +  - ]:        102 : SFX_IMPL_MODELESSDIALOG_WITHID(ScDbNameDlgWrapper, SID_DEFINE_DBNAME )
                 [ #  # ]
      54 [ #  # ][ +  - ]:        102 : SFX_IMPL_MODELESSDIALOG_WITHID(ScConsolidateDlgWrapper, SID_OPENDLG_CONSOLIDATE )
                 [ #  # ]
      55 [ #  # ][ +  - ]:        102 : SFX_IMPL_MODELESSDIALOG_WITHID(ScPrintAreasDlgWrapper, SID_OPENDLG_EDIT_PRINTAREA )
                 [ #  # ]
      56 [ #  # ][ +  - ]:        102 : SFX_IMPL_MODELESSDIALOG_WITHID(ScColRowNameRangesDlgWrapper, SID_DEFINE_COLROWNAMERANGES )
                 [ #  # ]
      57 [ #  # ][ +  - ]:        153 : SFX_IMPL_MODELESSDIALOG_WITHID(ScFormulaDlgWrapper, SID_OPENDLG_FUNCTION )
                 [ #  # ]
      58 [ #  # ][ +  - ]:        102 : SFX_IMPL_MODELESSDIALOG_WITHID(ScAcceptChgDlgWrapper, FID_CHG_ACCEPT )
                 [ #  # ]
      59 [ #  # ][ +  - ]:        102 : SFX_IMPL_MODELESSDIALOG_WITHID(ScHighlightChgDlgWrapper, FID_CHG_SHOW )
                 [ #  # ]
      60 [ #  # ][ +  - ]:        102 : SFX_IMPL_MODELESSDIALOG_WITHID(ScSimpleRefDlgWrapper, WID_SIMPLE_REF )
                 [ #  # ]
      61 [ +  - ][ #  # ]:        102 : SFX_IMPL_CHILDWINDOW_WITHID(ScValidityRefChildWin, SID_VALIDITY_REFERENCE)
      62                 :          0 : SfxChildWinInfo ScValidityRefChildWin::GetInfo() const
      63                 :            : {
      64                 :          0 :     SfxChildWinInfo anInfo = SfxChildWindow::GetInfo();
      65                 :            : 
      66         [ #  # ]:          0 :     if( Window *pWnd = GetWindow() )
      67                 :            :     {
      68         [ #  # ]:          0 :         anInfo.aSize  = pWnd->GetSizePixel();
      69                 :            : 
      70 [ #  # ][ #  # ]:          0 :         if( pWnd->IsDialog() )
      71         [ #  # ]:          0 :             if ( static_cast<Dialog*>(pWnd)->IsRollUp() )
      72                 :          0 :                 anInfo.nFlags |= SFX_CHILDWIN_ZOOMIN;
      73                 :            :     }
      74                 :            : 
      75                 :          0 :     return anInfo;
      76                 :            : }
      77                 :            : 
      78                 :            : namespace { ScTabViewShell * lcl_GetTabViewShell( SfxBindings *pBindings ); }
      79                 :            : 
      80                 :            : #define IMPL_CHILD_CTOR(Class,sid) \
      81                 :            :     Class::Class( Window*               pParentP,                   \
      82                 :            :                     sal_uInt16              nId,                        \
      83                 :            :                     SfxBindings*        p,                          \
      84                 :            :                     SfxChildWinInfo*    pInfo )                     \
      85                 :            :         : SfxChildWindow(pParentP, nId)                             \
      86                 :            :     {                                                               \
      87                 :            :         /************************************************************************************/\
      88                 :            :         /*      When a new document is creating, the SfxViewFrame may be ready,             */\
      89                 :            :         /*      But the ScTabViewShell may have not been activated yet. In this             */\
      90                 :            :         /*      situation, SfxViewShell::Current() does not get the correct shell,          */\
      91                 :            :         /*      and we should lcl_GetTabViewShell( p ) instead of SfxViewShell::Current()   */\
      92                 :            :         /************************************************************************************/\
      93                 :            :         ScTabViewShell* pViewShell = lcl_GetTabViewShell( p );      \
      94                 :            :         if (!pViewShell)                                            \
      95                 :            :             pViewShell = PTR_CAST( ScTabViewShell, SfxViewShell::Current() ); \
      96                 :            :         OSL_ENSURE( pViewShell, "missing view shell :-(" );         \
      97                 :            :         pWindow = pViewShell ?                                      \
      98                 :            :             pViewShell->CreateRefDialog( p, this, pInfo, pParentP, sid ) : NULL;    \
      99                 :            :         if (pViewShell && !pWindow)                                             \
     100                 :            :             pViewShell->GetViewFrame()->SetChildWindow( nId, false );           \
     101                 :            :     }
     102                 :            : 
     103                 :            : 
     104                 :            : //=========================================================================
     105                 :            : 
     106                 :            : //-------------------------------------------------------------------------
     107                 :            : // ScNameDlgWrapper
     108                 :            : //-------------------------------------------------------------------------
     109                 :            : 
     110 [ #  # ][ #  # ]:          0 : IMPL_CHILD_CTOR( ScNameDlgWrapper, FID_DEFINE_NAME )
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
     111                 :            :     //
     112                 :            : //-------------------------------------------------------------------------
     113                 :            : // ScNameDlgWrapper
     114                 :            : //-------------------------------------------------------------------------
     115                 :            : 
     116 [ #  # ][ #  # ]:          0 : IMPL_CHILD_CTOR( ScNameDefDlgWrapper, FID_ADD_NAME )
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
     117                 :            : 
     118                 :            : //-------------------------------------------------------------------------
     119                 :            : // ScSolverDlgWrapper
     120                 :            : //-------------------------------------------------------------------------
     121                 :            : 
     122 [ #  # ][ #  # ]:          0 : IMPL_CHILD_CTOR( ScSolverDlgWrapper, SID_OPENDLG_SOLVE )
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
     123                 :            : 
     124                 :            : //-------------------------------------------------------------------------
     125                 :            : // ScOptSolverDlgWrapper
     126                 :            : //-------------------------------------------------------------------------
     127                 :            : 
     128 [ #  # ][ #  # ]:          0 : IMPL_CHILD_CTOR( ScOptSolverDlgWrapper, SID_OPENDLG_OPTSOLVER )
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
     129                 :            : 
     130                 :            : //-------------------------------------------------------------------------
     131                 :            : // ScPivotLayoutWrapper
     132                 :            : //-------------------------------------------------------------------------
     133                 :            : 
     134 [ #  # ][ #  # ]:          0 : IMPL_CHILD_CTOR( ScPivotLayoutWrapper, SID_OPENDLG_PIVOTTABLE )
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
     135                 :            : 
     136                 :            : //-------------------------------------------------------------------------
     137                 :            : // ScTabOpDlgWrapper
     138                 :            : //-------------------------------------------------------------------------
     139                 :            : 
     140 [ #  # ][ #  # ]:          0 : IMPL_CHILD_CTOR( ScTabOpDlgWrapper, SID_OPENDLG_TABOP )
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
     141                 :            : 
     142                 :            : //-------------------------------------------------------------------------
     143                 :            : // ScFilterDlgWrapper
     144                 :            : //-------------------------------------------------------------------------
     145                 :            : 
     146 [ #  # ][ #  # ]:          0 : IMPL_CHILD_CTOR( ScFilterDlgWrapper, SID_FILTER )
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
     147                 :            : 
     148                 :            : //-------------------------------------------------------------------------
     149                 :            : // ScSpecialFilterDlgWrapper
     150                 :            : //-------------------------------------------------------------------------
     151                 :            : 
     152 [ #  # ][ #  # ]:          0 : IMPL_CHILD_CTOR( ScSpecialFilterDlgWrapper, SID_SPECIAL_FILTER )
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
     153                 :            : 
     154                 :            : //-------------------------------------------------------------------------
     155                 :            : // ScDbNameDlgWrapper
     156                 :            : //-------------------------------------------------------------------------
     157                 :            : 
     158 [ #  # ][ #  # ]:          0 : IMPL_CHILD_CTOR( ScDbNameDlgWrapper, SID_DEFINE_DBNAME )
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
     159                 :            : 
     160                 :            : //-------------------------------------------------------------------------
     161                 :            : // ScColRowNameRangesDlgWrapper
     162                 :            : //-------------------------------------------------------------------------
     163                 :            : 
     164 [ #  # ][ #  # ]:          0 : IMPL_CHILD_CTOR( ScColRowNameRangesDlgWrapper, SID_DEFINE_COLROWNAMERANGES )
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
     165                 :            : 
     166                 :            : //-------------------------------------------------------------------------
     167                 :            : // ScConsolidateDlgWrapper
     168                 :            : //-------------------------------------------------------------------------
     169                 :            : 
     170 [ #  # ][ #  # ]:          0 : IMPL_CHILD_CTOR( ScConsolidateDlgWrapper, SID_OPENDLG_CONSOLIDATE )
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
     171                 :            : 
     172                 :            : //-------------------------------------------------------------------------
     173                 :            : // ScPrintAreasDlgWrapper
     174                 :            : //-------------------------------------------------------------------------
     175                 :            : 
     176 [ #  # ][ #  # ]:          0 : IMPL_CHILD_CTOR( ScPrintAreasDlgWrapper, SID_OPENDLG_EDIT_PRINTAREA )
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
     177                 :            : 
     178                 :            : //-------------------------------------------------------------------------
     179                 :            : // ScFormulaDlgWrapper
     180                 :            : //-------------------------------------------------------------------------
     181                 :            : 
     182 [ #  # ][ #  # ]:          0 : IMPL_CHILD_CTOR( ScFormulaDlgWrapper, SID_OPENDLG_FUNCTION )
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
     183                 :            : 
     184                 :            : 
     185                 :            : //-------------------------------------------------------------------------
     186                 :            : // ScSimpleRefDlgWrapper
     187                 :            : //-------------------------------------------------------------------------
     188                 :            : 
     189                 :            : static sal_Bool     bScSimpleRefFlag;
     190                 :            : static long     nScSimpleRefHeight;
     191                 :            : static long     nScSimpleRefWidth;
     192                 :            : static long     nScSimpleRefX;
     193                 :            : static long     nScSimpleRefY;
     194                 :            : static sal_Bool     bAutoReOpen=sal_True;
     195                 :            : 
     196                 :          0 : ScSimpleRefDlgWrapper::ScSimpleRefDlgWrapper( Window* pParentP,
     197                 :            :                                 sal_uInt16              nId,
     198                 :            :                                 SfxBindings*        p,
     199                 :            :                                 SfxChildWinInfo*    pInfo )
     200                 :          0 :         : SfxChildWindow(pParentP, nId)
     201                 :            : {
     202                 :            : 
     203                 :          0 :     ScTabViewShell* pViewShell = NULL;
     204                 :          0 :     SfxDispatcher* pDisp = p->GetDispatcher();
     205         [ #  # ]:          0 :     if ( pDisp )
     206                 :            :     {
     207         [ #  # ]:          0 :         SfxViewFrame* pViewFrm = pDisp->GetFrame();
     208         [ #  # ]:          0 :         if ( pViewFrm )
     209 [ #  # ][ #  # ]:          0 :             pViewShell = PTR_CAST( ScTabViewShell, pViewFrm->GetViewShell() );
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
                 [ #  # ]
     210                 :            :     }
     211                 :            : 
     212                 :            :     OSL_ENSURE( pViewShell, "missing view shell :-(" );
     213                 :            : 
     214 [ #  # ][ #  # ]:          0 :     if(pInfo!=NULL && bScSimpleRefFlag)
     215                 :            :     {
     216                 :          0 :         pInfo->aPos.X()=nScSimpleRefX;
     217                 :          0 :         pInfo->aPos.Y()=nScSimpleRefY;
     218                 :          0 :         pInfo->aSize.Height()=nScSimpleRefHeight;
     219                 :          0 :         pInfo->aSize.Width()=nScSimpleRefWidth;
     220                 :            :     }
     221                 :          0 :     pWindow = NULL;
     222                 :            : 
     223 [ #  # ][ #  # ]:          0 :     if(bAutoReOpen && pViewShell)
     224         [ #  # ]:          0 :         pWindow = pViewShell->CreateRefDialog( p, this, pInfo, pParentP, WID_SIMPLE_REF);
     225                 :            : 
     226         [ #  # ]:          0 :     if (!pWindow)
     227                 :            :     {
     228 [ #  # ][ #  # ]:          0 :         SC_MOD()->SetRefDialog( nId, false );
     229                 :            :     }
     230                 :          0 : }
     231                 :            : 
     232                 :          0 : void ScSimpleRefDlgWrapper::SetDefaultPosSize(Point aPos, Size aSize, sal_Bool bSet)
     233                 :            : {
     234                 :          0 :     bScSimpleRefFlag=bSet;
     235         [ #  # ]:          0 :     if(bScSimpleRefFlag)
     236                 :            :     {
     237                 :          0 :         nScSimpleRefX=aPos.X();
     238                 :          0 :         nScSimpleRefY=aPos.Y();
     239                 :          0 :         nScSimpleRefHeight=aSize.Height();
     240                 :          0 :         nScSimpleRefWidth=aSize.Width();
     241                 :            :     }
     242                 :          0 : }
     243                 :            : 
     244                 :            : 
     245                 :          0 : String ScSimpleRefDlgWrapper::GetRefString()
     246                 :            : {
     247                 :          0 :     String aResult;
     248         [ #  # ]:          0 :     if(pWindow!=NULL)
     249                 :            :     {
     250 [ #  # ][ #  # ]:          0 :         aResult=((ScSimpleRefDlg*)pWindow)->GetRefString();
                 [ #  # ]
     251                 :            :     }
     252                 :          0 :     return aResult;
     253                 :            : }
     254                 :            : 
     255                 :          0 : void ScSimpleRefDlgWrapper::SetAutoReOpen(sal_Bool bFlag)
     256                 :            : {
     257                 :          0 :     bAutoReOpen=bFlag;
     258                 :          0 : }
     259                 :            : 
     260                 :          0 : void ScSimpleRefDlgWrapper::SetRefString(const String& rStr)
     261                 :            : {
     262         [ #  # ]:          0 :     if(pWindow!=NULL)
     263                 :            :     {
     264                 :          0 :         ((ScSimpleRefDlg*)pWindow)->SetRefString(rStr);
     265                 :            :     }
     266                 :          0 : }
     267                 :            : 
     268                 :          0 : void ScSimpleRefDlgWrapper::SetCloseHdl( const Link& rLink )
     269                 :            : {
     270         [ #  # ]:          0 :     if(pWindow!=NULL)
     271                 :            :     {
     272                 :          0 :         ((ScSimpleRefDlg*)pWindow)->SetCloseHdl( rLink );
     273                 :            :     }
     274                 :          0 : }
     275                 :            : 
     276                 :          0 : void ScSimpleRefDlgWrapper::SetUnoLinks( const Link& rDone,
     277                 :            :                     const Link& rAbort, const Link& rChange )
     278                 :            : {
     279         [ #  # ]:          0 :     if(pWindow!=NULL)
     280                 :            :     {
     281                 :          0 :         ((ScSimpleRefDlg*)pWindow)->SetUnoLinks( rDone, rAbort, rChange );
     282                 :            :     }
     283                 :          0 : }
     284                 :            : 
     285                 :          0 : void ScSimpleRefDlgWrapper::SetFlags( sal_Bool bCloseOnButtonUp, sal_Bool bSingleCell, sal_Bool bMultiSelection )
     286                 :            : {
     287         [ #  # ]:          0 :     if(pWindow!=NULL)
     288                 :            :     {
     289                 :          0 :         ((ScSimpleRefDlg*)pWindow)->SetFlags( bCloseOnButtonUp, bSingleCell, bMultiSelection );
     290                 :            :     }
     291                 :          0 : }
     292                 :            : 
     293                 :          0 : void ScSimpleRefDlgWrapper::StartRefInput()
     294                 :            : {
     295         [ #  # ]:          0 :     if(pWindow!=NULL)
     296                 :            :     {
     297                 :          0 :         ((ScSimpleRefDlg*)pWindow)->StartRefInput();
     298                 :            :     }
     299                 :          0 : }
     300                 :            : 
     301                 :            : 
     302                 :            : 
     303                 :            : //-------------------------------------------------------------------------
     304                 :            : // ScAcceptChgDlgWrapper //Kommentar: sollte in die ViewShell
     305                 :            : //-------------------------------------------------------------------------
     306                 :            : 
     307                 :          0 : ScAcceptChgDlgWrapper::ScAcceptChgDlgWrapper(   Window* pParentP,
     308                 :            :                                             sal_uInt16 nId,
     309                 :            :                                             SfxBindings* pBindings,
     310                 :            :                                             SfxChildWinInfo* pInfo ) :
     311                 :          0 :                                             SfxChildWindow( pParentP, nId )
     312                 :            : {
     313                 :            :         ScTabViewShell* pViewShell =
     314 [ #  # ][ #  # ]:          0 :             PTR_CAST( ScTabViewShell, SfxViewShell::Current() );
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
                 [ #  # ]
     315                 :            :         OSL_ENSURE( pViewShell, "missing view shell :-(" );
     316                 :            :         pWindow = pViewShell ?
     317         [ #  # ]:          0 :             new ScAcceptChgDlg( pBindings, this, pParentP, pViewShell->GetViewData() ) :
     318 [ #  # ][ #  # ]:          0 :             NULL;
     319         [ #  # ]:          0 :         if(pWindow!=NULL)
     320                 :            :         {
     321         [ #  # ]:          0 :             ((ScAcceptChgDlg*)pWindow)->Initialize( pInfo );
     322                 :            :         }
     323 [ #  # ][ #  # ]:          0 :         if (pViewShell && !pWindow)
     324         [ #  # ]:          0 :             pViewShell->GetViewFrame()->SetChildWindow( nId, false );
     325                 :          0 : }
     326                 :            : 
     327                 :          0 : void ScAcceptChgDlgWrapper::ReInitDlg()
     328                 :            : {
     329                 :            :     ScTabViewShell* pViewShell =
     330 [ #  # ][ #  # ]:          0 :         PTR_CAST( ScTabViewShell, SfxViewShell::Current() );
     331                 :            :     OSL_ENSURE( pViewShell, "missing view shell :-(" );
     332                 :            : 
     333 [ #  # ][ #  # ]:          0 :     if(pWindow!=NULL && pViewShell)
     334                 :            :     {
     335                 :          0 :         ((ScAcceptChgDlg*)pWindow)->ReInit(pViewShell->GetViewData());
     336                 :            :     }
     337                 :          0 : }
     338                 :            : 
     339                 :            : //-------------------------------------------------------------------------
     340                 :            : // ScHighlightChgDlgWrapper
     341                 :            : //-------------------------------------------------------------------------
     342                 :            : 
     343 [ #  # ][ #  # ]:          0 : IMPL_CHILD_CTOR( ScHighlightChgDlgWrapper, FID_CHG_SHOW )
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
     344                 :            : 
     345                 :            : 
     346                 :            : namespace
     347                 :            : {
     348                 :          0 :     ScTabViewShell * lcl_GetTabViewShell( SfxBindings *pBindings )
     349                 :            :     {
     350         [ #  # ]:          0 :         if( pBindings )
     351         [ #  # ]:          0 :             if( SfxDispatcher* pDisp = pBindings ->GetDispatcher() )
     352         [ #  # ]:          0 :                 if( SfxViewFrame *pFrm = pDisp->GetFrame() )
     353         [ #  # ]:          0 :                     if( SfxViewShell* pViewSh = pFrm->GetViewShell() )
     354         [ #  # ]:          0 :                         return dynamic_cast<ScTabViewShell*>( pViewSh );
     355                 :            : 
     356                 :          0 :         return NULL;
     357                 :            :     }
     358                 :            : }
     359                 :            : 
     360                 :          0 : ScValidityRefChildWin::ScValidityRefChildWin( Window*               pParentP,                   \
     361                 :            :                                              sal_uInt16             nId,                        \
     362                 :            :                                              SfxBindings*       p,                          \
     363                 :            :                                              SfxChildWinInfo*   /*pInfo*/ )                     \
     364                 :            :                                              : SfxChildWindow(pParentP, nId),
     365                 :            :                                              m_bVisibleLock( false ),
     366                 :            :                                              m_bFreeWindowLock( false ),
     367                 :          0 :                                              m_pSavedWndParent( NULL )
     368                 :            : {
     369         [ #  # ]:          0 :     SetWantsFocus( false );\
     370                 :            :         ScTabViewShell* pViewShell =                                \
     371         [ #  # ]:          0 :             NULL != ( pWindow =  ScValidationDlg::Find1AliveObject( pParentP ) ) ? static_cast<ScValidationDlg*>(pWindow)->GetTabViewShell() :
     372 [ #  # ][ #  # ]:          0 :             lcl_GetTabViewShell( p );
     373         [ #  # ]:          0 :         if (!pViewShell)
     374 [ #  # ][ #  # ]:          0 :             pViewShell = PTR_CAST( ScTabViewShell, SfxViewShell::Current() );
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
                 [ #  # ]
     375                 :            :         OSL_ENSURE( pViewShell, "missing view shell :-(" );         \
     376 [ #  # ][ #  # ]:          0 :         if (pViewShell && !pWindow)                                             \
     377         [ #  # ]:          0 :             pViewShell->GetViewFrame()->SetChildWindow( nId, false );           \
     378                 :            : 
     379 [ #  # ][ #  # ]:          0 :     if( pWindow ) m_pSavedWndParent = pWindow->GetParent();
     380                 :          0 : }
     381                 :            : 
     382                 :          0 : ScValidityRefChildWin::~ScValidityRefChildWin()
     383                 :            : {
     384 [ #  # ][ #  # ]:          0 :     if( pWindow ) pWindow->SetParent( m_pSavedWndParent );
     385                 :            : 
     386         [ #  # ]:          0 :     if( m_bFreeWindowLock )
     387                 :          0 :         pWindow = NULL;
     388         [ #  # ]:          0 : }
     389                 :            : 
     390                 :            : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10