LCOV - code coverage report
Current view: top level - include/oox/drawingml - theme.hxx (source / functions) Hit Total Coverage
Test: commit e02a6cb2c3e2b23b203b422e4e0680877f232636 Lines: 0 13 0.0 %
Date: 2014-04-14 Functions: 0 12 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             : #ifndef INCLUDED_OOX_DRAWINGML_THEME_HXX
      21             : #define INCLUDED_OOX_DRAWINGML_THEME_HXX
      22             : 
      23             : #include <oox/drawingml/clrscheme.hxx>
      24             : #include <oox/drawingml/shape.hxx>
      25             : #include <oox/drawingml/textfont.hxx>
      26             : #include <com/sun/star/xml/dom/XDocument.hpp>
      27             : #include <oox/dllapi.h>
      28             : 
      29             : namespace oox {
      30             : namespace drawingml {
      31             : 
      32             : 
      33             : 
      34             : const sal_Int32 THEMED_STYLE_SUBTLE     = 1;
      35             : const sal_Int32 THEMED_STYLE_MODERATE   = 2;
      36             : const sal_Int32 THEMED_STYLE_INTENSE    = 3;
      37             : 
      38             : typedef RefVector< FillProperties >                     FillStyleList;
      39             : typedef RefVector< LineProperties >                     LineStyleList;
      40             : typedef RefVector< EffectProperties >                   EffectStyleList;
      41             : typedef RefMap< sal_Int32, TextCharacterProperties >    FontScheme;
      42             : 
      43             : 
      44             : 
      45             : class OOX_DLLPUBLIC Theme
      46             : {
      47             : public:
      48             :                         Theme();
      49             :                         ~Theme();
      50             : 
      51           0 :     void                     setStyleName( const OUString& rStyleName ) { maStyleName = rStyleName; }
      52             :     const OUString&          getStyleName() const { return maStyleName; }
      53             : 
      54           0 :     ClrScheme&               getClrScheme() { return maClrScheme; }
      55           0 :     const ClrScheme&         getClrScheme() const { return maClrScheme; }
      56             : 
      57           0 :     FillStyleList&           getFillStyleList() { return maFillStyleList; }
      58             :     const FillStyleList&     getFillStyleList() const { return maFillStyleList; }
      59           0 :     FillStyleList&           getBgFillStyleList() { return maBgFillStyleList; }
      60             :     const FillStyleList&     getBgFillStyleList() const { return maBgFillStyleList; }
      61             :     /** Returns the fill properties of the passed one-based themed style index. */
      62             :     const FillProperties*           getFillStyle( sal_Int32 nIndex ) const;
      63             : 
      64           0 :     LineStyleList&           getLineStyleList() { return maLineStyleList; }
      65             :     const LineStyleList&     getLineStyleList() const { return maLineStyleList; }
      66             :     /** Returns the line properties of the passed one-based themed style index. */
      67             :     const LineProperties*           getLineStyle( sal_Int32 nIndex ) const;
      68             : 
      69           0 :     EffectStyleList&         getEffectStyleList() { return maEffectStyleList; }
      70             :     const EffectStyleList&   getEffectStyleList() const { return maEffectStyleList; }
      71             :     const EffectProperties*         getEffectStyle( sal_Int32 nIndex ) const;
      72             : 
      73           0 :     FontScheme&              getFontScheme() { return maFontScheme; }
      74             :     const FontScheme&        getFontScheme() const { return maFontScheme; }
      75             :     /** Returns theme font properties by scheme type (major/minor). */
      76             :     const TextCharacterProperties*  getFontStyle( sal_Int32 nSchemeType ) const;
      77             :     /** Returns theme font by placeholder name, e.g. the major latin theme font for the font name '+mj-lt'. */
      78             :     const TextFont*                 resolveFont( const OUString& rName ) const;
      79             : 
      80           0 :     Shape&                   getSpDef() { return maSpDef; }
      81             :     const Shape&             getSpDef() const { return maSpDef; }
      82             : 
      83           0 :     Shape&                   getLnDef() { return maLnDef; }
      84             :     const Shape&             getLnDef() const { return maLnDef; }
      85             : 
      86           0 :     Shape&                   getTxDef() { return maTxDef; }
      87             :     const Shape&             getTxDef() const { return maTxDef; }
      88             : 
      89           0 :     void                            setFragment( const ::com::sun::star::uno::Reference<
      90           0 :                                                     ::com::sun::star::xml::dom::XDocument>& xRef ) { mxFragment=xRef; }
      91             :     const ::com::sun::star::uno::Reference<
      92             :         ::com::sun::star::xml::dom::XDocument>& getFragment() const { return mxFragment; }
      93             : 
      94             : private:
      95             :     OUString     maStyleName;
      96             :     ClrScheme           maClrScheme;
      97             :     FillStyleList       maFillStyleList;
      98             :     FillStyleList       maBgFillStyleList;
      99             :     LineStyleList       maLineStyleList;
     100             :     EffectStyleList     maEffectStyleList;
     101             :     FontScheme          maFontScheme;
     102             :     Shape               maSpDef;
     103             :     Shape               maLnDef;
     104             :     Shape               maTxDef;
     105             :     ::com::sun::star::uno::Reference<
     106             :         ::com::sun::star::xml::dom::XDocument> mxFragment;
     107             : };
     108             : 
     109             : 
     110             : 
     111             : } // namespace drawingml
     112             : } // namespace oox
     113             : 
     114             : #endif
     115             : 
     116             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10