LCOV - code coverage report
Current view: top level - sw/source/uibase/uiview - viewcoll.cxx (source / functions) Hit Total Coverage
Test: commit c8344322a7af75b84dd3ca8f78b05543a976dfd5 Lines: 1 24 4.2 %
Date: 2015-06-13 12:38:46 Functions: 2 3 66.7 %
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/bindings.hxx>
      24             : #include <sfx2/request.hxx>
      25             : #include <sfx2/viewfrm.hxx>
      26             : #include <svl/stritem.hxx>
      27             : #include <rsc/rscsfx.hxx>
      28             : 
      29             : #include "view.hxx"
      30             : #include "wrtsh.hxx"
      31             : #include "basesh.hxx"
      32             : 
      33           0 : void SwView::ExecColl(SfxRequest &rReq)
      34             : {
      35           0 :     const SfxItemSet* pArgs = rReq.GetArgs();
      36           0 :     const SfxPoolItem* pItem = 0;
      37           0 :     sal_uInt16 nWhich = rReq.GetSlot();
      38           0 :     switch( nWhich )
      39             :     {
      40             :         case FN_SET_PAGE:
      41             :         {
      42             :             OSL_ENSURE(false, "Not implemented");
      43             :         }
      44           0 :         break;
      45             :         case FN_SET_PAGE_STYLE:
      46             :         {
      47           0 :             if( pArgs )
      48             :             {
      49           0 :                 if (pArgs &&
      50           0 :                     SfxItemState::SET == pArgs->GetItemState( nWhich , true, &pItem ))
      51             :                 {
      52           0 :                     if( static_cast<const SfxStringItem*>(pItem)->GetValue() !=
      53           0 :                                             GetWrtShell().GetCurPageStyle(false) )
      54             :                     {
      55             :                         SfxStringItem aName(SID_STYLE_APPLY,
      56           0 :                                    static_cast<const SfxStringItem*>(pItem)->GetValue());
      57             :                         SfxUInt16Item aFamItem( SID_STYLE_FAMILY,
      58           0 :                                             SFX_STYLE_FAMILY_PAGE);
      59           0 :                         SwPtrItem aShell(FN_PARAM_WRTSHELL, GetWrtShellPtr());
      60           0 :                         SfxRequest aReq(SID_STYLE_APPLY, SfxCallMode::SLOT, GetPool());
      61           0 :                         aReq.AppendItem(aName);
      62           0 :                         aReq.AppendItem(aFamItem);
      63           0 :                         aReq.AppendItem(aShell);
      64           0 :                         GetCurShell()->ExecuteSlot(aReq);
      65             :                     }
      66             :                 }
      67             :             }
      68             :             else
      69             :             {
      70           0 :                 SfxRequest aReq(FN_FORMAT_PAGE_DLG, SfxCallMode::SLOT, GetPool());
      71           0 :                 GetCurShell()->ExecuteSlot(aReq);
      72             :             }
      73             :         }
      74           0 :         break;
      75             :         default:
      76             :             OSL_FAIL("wrong CommandProcessor for Dispatch");
      77           0 :             return;
      78             :     }
      79         177 : }
      80             : 
      81             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.11