LCOV - code coverage report
Current view: top level - svx/source/sdr/properties - pageproperties.cxx (source / functions) Hit Total Coverage
Test: commit 10e77ab3ff6f4314137acd6e2702a6e5c1ce1fae Lines: 8 27 29.6 %
Date: 2014-11-03 Functions: 6 13 46.2 %
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/pageproperties.hxx>
      21             : #include <svl/itemset.hxx>
      22             : #include <svx/svdobj.hxx>
      23             : #include <svx/svdpool.hxx>
      24             : 
      25             : 
      26             : 
      27             : namespace sdr
      28             : {
      29             :     namespace properties
      30             :     {
      31             :         // create a new itemset
      32           0 :         SfxItemSet& PageProperties::CreateObjectSpecificItemSet(SfxItemPool& rPool)
      33             :         {
      34             :             // overloaded to legally return a valid ItemSet
      35           0 :             return *(new SfxItemSet(rPool));
      36             :         }
      37             : 
      38          42 :         PageProperties::PageProperties(SdrObject& rObj)
      39          42 :         :   EmptyProperties(rObj)
      40             :         {
      41          42 :         }
      42             : 
      43           0 :         PageProperties::PageProperties(const PageProperties& rProps, SdrObject& rObj)
      44           0 :         :   EmptyProperties(rProps, rObj)
      45             :         {
      46           0 :         }
      47             : 
      48          84 :         PageProperties::~PageProperties()
      49             :         {
      50          84 :         }
      51             : 
      52           0 :         BaseProperties& PageProperties::Clone(SdrObject& rObj) const
      53             :         {
      54           0 :             return *(new PageProperties(*this, rObj));
      55             :         }
      56             : 
      57             :         // get itemset. Overloaded here to allow creating the empty itemset
      58             :         // without asserting
      59           0 :         const SfxItemSet& PageProperties::GetObjectItemSet() const
      60             :         {
      61           0 :             if(!mpEmptyItemSet)
      62             :             {
      63           0 :                 ((PageProperties*)this)->mpEmptyItemSet = &(((PageProperties*)this)->CreateObjectSpecificItemSet(GetSdrObject().GetObjectItemPool()));
      64             :             }
      65             : 
      66             :             DBG_ASSERT(mpEmptyItemSet, "Could not create an SfxItemSet(!)");
      67             : 
      68           0 :             return *mpEmptyItemSet;
      69             :         }
      70             : 
      71           0 :         void PageProperties::ItemChange(const sal_uInt16 /*nWhich*/, const SfxPoolItem* /*pNewItem*/)
      72             :         {
      73             :             // #86481# simply ignore item setting on page objects
      74           0 :         }
      75             : 
      76          42 :         SfxStyleSheet* PageProperties::GetStyleSheet() const
      77             :         {
      78             :             // overloaded to legally return a 0L pointer here
      79          42 :             return 0L;
      80             :         }
      81             : 
      82           0 :         void PageProperties::PostItemChange(const sal_uInt16 nWhich )
      83             :         {
      84           0 :             if( (nWhich == XATTR_FILLSTYLE) && (mpEmptyItemSet != NULL) )
      85           0 :                 CleanupFillProperties(*mpEmptyItemSet);
      86           0 :         }
      87             : 
      88           0 :         void PageProperties::ClearObjectItem(const sal_uInt16 /*nWhich*/)
      89             :         {
      90             :             // simply ignore item clearing on page objects
      91           0 :         }
      92             :     } // end of namespace properties
      93         651 : } // end of namespace sdr
      94             : 
      95             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10