LCOV - code coverage report
Current view: top level - sw/source/core/uibase/uiview - viewcoll.cxx (source / functions) Hit Total Coverage
Test: commit e02a6cb2c3e2b23b203b422e4e0680877f232636 Lines: 0 23 0.0 %
Date: 2014-04-14 Functions: 0 1 0.0 %
Legend: Lines: hit not hit

          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             : 
      20             : #include "cmdid.h"
      21             : #include "uiitems.hxx"
      22             : #include <vcl/window.hxx>
      23             : #include <sfx2/request.hxx>
      24             : #include <sfx2/viewfrm.hxx>
      25             : #include <svl/stritem.hxx>
      26             : #include <rsc/rscsfx.hxx>
      27             : 
      28             : #include "view.hxx"
      29             : #include "wrtsh.hxx"
      30             : #include "basesh.hxx"
      31             : 
      32           0 : void SwView::ExecColl(SfxRequest &rReq)
      33             : {
      34           0 :     const SfxItemSet* pArgs = rReq.GetArgs();
      35           0 :     const SfxPoolItem* pItem = 0;
      36           0 :     sal_uInt16 nWhich = rReq.GetSlot();
      37           0 :     switch( nWhich )
      38             :     {
      39             :         case FN_SET_PAGE:
      40             :         {
      41             :             OSL_ENSURE(!this, "Not implemented");
      42             :         }
      43           0 :         break;
      44             :         case FN_SET_PAGE_STYLE:
      45             :         {
      46           0 :             if( pArgs )
      47             :             {
      48           0 :                 if (pArgs &&
      49           0 :                     SFX_ITEM_SET == pArgs->GetItemState( nWhich , true, &pItem ))
      50             :                 {
      51           0 :                     if( ((SfxStringItem*)pItem)->GetValue() !=
      52           0 :                                             GetWrtShell().GetCurPageStyle(sal_False) )
      53             :                     {
      54             :                         SfxStringItem aName(SID_STYLE_APPLY,
      55           0 :                                    ((SfxStringItem*)pItem)->GetValue());
      56             :                         SfxUInt16Item aFamItem( SID_STYLE_FAMILY,
      57           0 :                                             SFX_STYLE_FAMILY_PAGE);
      58           0 :                         SwPtrItem aShell(FN_PARAM_WRTSHELL, GetWrtShellPtr());
      59           0 :                         SfxRequest aReq(SID_STYLE_APPLY, 0, GetPool());
      60           0 :                         aReq.AppendItem(aName);
      61           0 :                         aReq.AppendItem(aFamItem);
      62           0 :                         aReq.AppendItem(aShell);
      63           0 :                         GetCurShell()->ExecuteSlot(aReq);
      64             :                     }
      65             :                 }
      66             :             }
      67             :             else
      68             :             {
      69           0 :                 SfxRequest aReq(FN_FORMAT_PAGE_DLG, 0, GetPool());
      70           0 :                 GetCurShell()->ExecuteSlot(aReq);
      71             :             }
      72             :         }
      73           0 :         break;
      74             :         default:
      75             :             OSL_FAIL("wrong CommandProcessor for Dispatch");
      76           0 :             return;
      77             :     }
      78             : }
      79             : 
      80             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10