LCOV - code coverage report
Current view: top level - sd/source/ui/dlg - dlgpage.cxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 0 35 0.0 %
Date: 2012-08-25 Functions: 0 2 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                 :            : #ifdef SD_DLLIMPLEMENTATION
      31                 :            : #undef SD_DLLIMPLEMENTATION
      32                 :            : #endif
      33                 :            : 
      34                 :            : #include <svl/intitem.hxx>
      35                 :            : #include <svx/dialogs.hrc>
      36                 :            : #include <svx/drawitem.hxx>
      37                 :            : 
      38                 :            : #include "sdresid.hxx"
      39                 :            : #include "dlgpage.hxx"
      40                 :            : 
      41                 :            : #include "DrawDocShell.hxx"
      42                 :            : #include <svl/aeitem.hxx>
      43                 :            : #include <svx/flagsdef.hxx>
      44                 :            : #include <editeng/svxenum.hxx>
      45                 :            : 
      46                 :            : /*************************************************************************
      47                 :            : |*
      48                 :            : |* Konstruktor des Tab-Dialogs: Fuegt die Seiten zum Dialog hinzu
      49                 :            : |*
      50                 :            : \************************************************************************/
      51                 :            : 
      52                 :          0 : SdPageDlg::SdPageDlg( SfxObjectShell* pDocSh, Window* pParent, const SfxItemSet* pAttr, sal_Bool bAreaPage ) :
      53                 :            :         SfxTabDialog ( pParent, SdResId( TAB_PAGE ), pAttr ),
      54                 :            :         mrOutAttrs          ( *pAttr ),
      55                 :          0 :         mpDocShell          ( pDocSh )
      56                 :            : {
      57                 :            :     SvxColorListItem aColorListItem(*( (const SvxColorListItem*)
      58                 :          0 :         ( mpDocShell->GetItem( SID_COLOR_TABLE ) ) ) );
      59                 :            :     SvxGradientListItem aGradientListItem(*( (const SvxGradientListItem*)
      60                 :          0 :         ( mpDocShell->GetItem( SID_GRADIENT_LIST ) ) ) );
      61                 :            :     SvxBitmapListItem aBitmapListItem(*( (const SvxBitmapListItem*)
      62                 :          0 :         ( mpDocShell->GetItem( SID_BITMAP_LIST ) ) ) );
      63                 :            :     SvxHatchListItem aHatchListItem(*( (const SvxHatchListItem*)
      64                 :          0 :         ( mpDocShell->GetItem( SID_HATCH_LIST ) ) ) );
      65                 :            : 
      66                 :          0 :     mpColorList = aColorListItem.GetColorList();
      67                 :          0 :     mpGradientList = aGradientListItem.GetGradientList();
      68                 :          0 :     mpHatchingList = aHatchListItem.GetHatchList();
      69                 :          0 :     mpBitmapList = aBitmapListItem.GetBitmapList();
      70                 :            : 
      71                 :          0 :     FreeResource();
      72                 :            : 
      73                 :          0 :     AddTabPage( RID_SVXPAGE_PAGE);
      74                 :          0 :     AddTabPage( RID_SVXPAGE_AREA);
      75                 :            : 
      76                 :          0 :     if(!bAreaPage)  // I have to add the page before I remove it !
      77                 :          0 :         RemoveTabPage( RID_SVXPAGE_AREA );
      78                 :          0 : }
      79                 :            : 
      80                 :            : 
      81                 :            : /*************************************************************************
      82                 :            : |*
      83                 :            : |* Seite wird erzeugt
      84                 :            : |*
      85                 :            : \************************************************************************/
      86                 :            : 
      87                 :          0 : void SdPageDlg::PageCreated(sal_uInt16 nId, SfxTabPage& rPage)
      88                 :            : {
      89                 :          0 :     SfxAllItemSet aSet(*(GetInputSetImpl()->GetPool()));
      90                 :          0 :     switch(nId)
      91                 :            :     {
      92                 :            :     case RID_SVXPAGE_PAGE:
      93                 :          0 :         aSet.Put (SfxAllEnumItem((const sal_uInt16)SID_ENUM_PAGE_MODE, SVX_PAGE_MODE_PRESENTATION));
      94                 :          0 :         aSet.Put (SfxAllEnumItem((const sal_uInt16)SID_PAPER_START, PAPER_A0));
      95                 :          0 :         aSet.Put (SfxAllEnumItem((const sal_uInt16)SID_PAPER_END, PAPER_E));
      96                 :          0 :         rPage.PageCreated(aSet);
      97                 :          0 :         break;
      98                 :            :     case RID_SVXPAGE_AREA:
      99                 :          0 :             aSet.Put (SvxColorListItem(mpColorList,SID_COLOR_TABLE));
     100                 :          0 :             aSet.Put (SvxGradientListItem(mpGradientList,SID_GRADIENT_LIST));
     101                 :          0 :             aSet.Put (SvxHatchListItem(mpHatchingList,SID_HATCH_LIST));
     102                 :          0 :             aSet.Put (SvxBitmapListItem(mpBitmapList,SID_BITMAP_LIST));
     103                 :          0 :             aSet.Put (SfxUInt16Item(SID_PAGE_TYPE,0));
     104                 :          0 :             aSet.Put (SfxUInt16Item(SID_DLG_TYPE,1));
     105                 :          0 :             aSet.Put (SfxUInt16Item(SID_TABPAGE_POS,0));
     106                 :          0 :             rPage.PageCreated(aSet);
     107                 :          0 :         break;
     108                 :          0 :     }
     109                 :          0 : }
     110                 :            : 
     111                 :            : 
     112                 :            : 
     113                 :            : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10