LCOV - code coverage report
Current view: top level - svx/source/sdr/properties - e3dproperties.cxx (source / functions) Hit Total Coverage
Test: commit c8344322a7af75b84dd3ca8f78b05543a976dfd5 Lines: 18 24 75.0 %
Date: 2015-06-13 12:38:46 Functions: 5 8 62.5 %
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 <sdr/properties/e3dproperties.hxx>
      21             : #include <svl/itemset.hxx>
      22             : #include <svx/svddef.hxx>
      23             : #include <svx/obj3d.hxx>
      24             : 
      25             : 
      26             : 
      27             : namespace sdr
      28             : {
      29             :     namespace properties
      30             :     {
      31             :         // create a new itemset
      32        6167 :         SfxItemSet* E3dProperties::CreateObjectSpecificItemSet(SfxItemPool& rPool)
      33             :         {
      34             :             return new SfxItemSet(rPool,
      35             : 
      36             :                 // ranges from SdrAttrObj
      37             :                 SDRATTR_START, SDRATTR_SHADOW_LAST,
      38             :                 SDRATTR_MISC_FIRST, SDRATTR_MISC_LAST,
      39             :                 SDRATTR_TEXTDIRECTION, SDRATTR_TEXTDIRECTION,
      40             : 
      41             :                 // ranges from E3dObject, contains object and scene because of GetMergedItemSet()
      42             :                 SDRATTR_3D_FIRST, SDRATTR_3D_LAST,
      43             : 
      44             :                 // end
      45        6167 :                 0, 0);
      46             :         }
      47             : 
      48        6167 :         E3dProperties::E3dProperties(SdrObject& rObj)
      49        6167 :         :   AttributeProperties(rObj)
      50             :         {
      51        6167 :         }
      52             : 
      53           0 :         E3dProperties::E3dProperties(const E3dProperties& rProps, SdrObject& rObj)
      54           0 :         :   AttributeProperties(rProps, rObj)
      55             :         {
      56           0 :         }
      57             : 
      58        6167 :         E3dProperties::~E3dProperties()
      59             :         {
      60        6167 :         }
      61             : 
      62           0 :         BaseProperties& E3dProperties::Clone(SdrObject& rObj) const
      63             :         {
      64           0 :             return *(new E3dProperties(*this, rObj));
      65             :         }
      66             : 
      67       21273 :         void E3dProperties::ItemSetChanged(const SfxItemSet& rSet)
      68             :         {
      69       21273 :             E3dObject& rObj = static_cast<E3dObject&>(GetSdrObject());
      70             : 
      71             :             // call parent
      72       21273 :             AttributeProperties::ItemSetChanged(rSet);
      73             : 
      74             :             // local changes
      75       21273 :             rObj.StructureChanged();
      76       21273 :         }
      77             : 
      78        4894 :         void E3dProperties::SetStyleSheet(SfxStyleSheet* pNewStyleSheet, bool bDontRemoveHardAttr)
      79             :         {
      80             :             // call parent
      81        4894 :             AttributeProperties::SetStyleSheet(pNewStyleSheet, bDontRemoveHardAttr);
      82             : 
      83             :             // propagate call to contained objects
      84        4894 :             const SdrObjList* pSub = static_cast<const E3dObject&>(GetSdrObject()).GetSubList();
      85        4894 :             const size_t nCount(pSub->GetObjCount());
      86             : 
      87        4894 :             for(size_t a = 0; a < nCount; ++a)
      88             :             {
      89           0 :                 pSub->GetObj(a)->GetProperties().SetStyleSheet(pNewStyleSheet, bDontRemoveHardAttr);
      90             :             }
      91        4894 :         }
      92             :     } // end of namespace properties
      93             : } // end of namespace sdr
      94             : 
      95             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.11