LCOV - code coverage report
Current view: top level - libreoffice/sc/source/filter/excel - xltoolbar.hxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 1 8 12.5 %
Date: 2012-12-27 Functions: 1 12 8.3 %
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             :  * Version: MPL 1.1 / GPLv3+ / LGPLv3+
       4             :  *
       5             :  * The contents of this file are subject to the Mozilla Public License Version
       6             :  * 1.1 (the "License"); you may not use this file except in compliance with
       7             :  * the License or as specified alternatively below. You may obtain a copy of
       8             :  * the License at http://www.mozilla.org/MPL/
       9             :  *
      10             :  * Software distributed under the License is distributed on an "AS IS" basis,
      11             :  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
      12             :  * for the specific language governing rights and limitations under the
      13             :  * License.
      14             :  *
      15             :  * The Initial Developer of the Original Code is
      16             :  *       Noel Power <noel.power@novell.com>
      17             :  * Portions created by the Initial Developer are Copyright (C) 2010 the
      18             :  * Initial Developer. All Rights Reserved.
      19             :  *
      20             :  * Contributor(s):
      21             :  *       Noel Power <noel.power@novell.com>
      22             :  *
      23             :  * For minor contributions see the git repository.
      24             :  *
      25             :  * Alternatively, the contents of this file may be used under the terms of
      26             :  * either the GNU General Public License Version 3 or later (the "GPLv3+"), or
      27             :  * the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"),
      28             :  * in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable
      29             :  * instead of those above.
      30             :  */
      31             : #ifndef _XLTOOLBAR_HXX
      32             : #define _XLTOOLBAR_HXX
      33             : 
      34             : #include <filter/msfilter/mstoolbar.hxx>
      35             : 
      36             : class ScCTBWrapper;
      37             : // hmm I don't normally use these packed structures
      38             : // but.. hey always good to do something different
      39           0 : class TBCCmd : public TBBase
      40             : {
      41             : public:
      42           0 :     TBCCmd() : cmdID(0), A(0), B(0), cmdType(0), C(0), reserved3(0) {}
      43             :     sal_uInt16 cmdID;
      44             :     sal_uInt16 A:1;
      45             :     sal_uInt16 B:1;
      46             :     sal_uInt16 cmdType:5;
      47             :     sal_uInt16 C:1;
      48             :     sal_uInt16 reserved3:8;
      49             :     bool Read( SvStream& rS );
      50             :     void Print(FILE* fp);
      51             : };
      52             : 
      53           0 : class ScTBC : public TBBase
      54             : {
      55             :     TBCHeader tbch;
      56             :     boost::shared_ptr<TBCCmd> tbcCmd; // optional
      57             :     boost::shared_ptr<TBCData> tbcd;
      58             : public:
      59             :     ScTBC();
      60           0 :     ~ScTBC(){}
      61             :     void Print( FILE* );
      62             :     bool Read(SvStream &rS);
      63             :     bool ImportToolBarControl( ScCTBWrapper&, const com::sun::star::uno::Reference< com::sun::star::container::XIndexContainer >& toolbarcontainer, CustomToolBarImportHelper& helper, bool bIsMenuBar );
      64             : };
      65             : 
      66           0 : class ScCTB : public TBBase
      67             : {
      68             :     sal_uInt16 nViews;
      69             :     TB tb;
      70             :     std::vector<TBVisualData> rVisualData;
      71             :     sal_uInt32 ectbid;
      72             :     std::vector< ScTBC > rTBC;
      73             :     bool ImportCustomToolBar_Impl( ScCTBWrapper&, CustomToolBarImportHelper& );
      74             : public:
      75             :     ScCTB(sal_uInt16);
      76           0 :     ~ScCTB(){}
      77             :     void Print( FILE* );
      78             :     bool Read(SvStream &rS);
      79             :     bool IsMenuToolbar();
      80             :     bool ImportCustomToolBar( ScCTBWrapper&, CustomToolBarImportHelper& );
      81             :     bool ImportMenuTB( ScCTBWrapper&, const css::uno::Reference< css::container::XIndexContainer >&, CustomToolBarImportHelper& );
      82           0 :     rtl::OUString GetName() { return tb.getName().getString(); }
      83             : 
      84             : 
      85             : };
      86             : 
      87             : class CTBS : public TBBase
      88             : {
      89             : public:
      90             :     sal_uInt8 bSignature;
      91             :     sal_uInt8 bVersion;
      92             :     sal_uInt16 reserved1;
      93             :     sal_uInt16 reserved2;
      94             :     sal_uInt16 reserved3;
      95             :     sal_uInt16 ctb;
      96             :     sal_uInt16 ctbViews;
      97             :     sal_uInt16 ictbView;
      98             :     CTBS(const CTBS&);
      99             :     CTBS& operator = ( const CTBS&);
     100             :     CTBS();
     101           3 :     ~CTBS(){}
     102             :     void Print( FILE* );
     103             :     bool Read(SvStream &rS);
     104             : };
     105             : 
     106             : class ScCTBWrapper : public TBBase
     107             : {
     108             :     CTBS ctbSet;
     109             : 
     110             :     std::vector< ScCTB > rCTB;
     111             : 
     112             : public:
     113             :     ScCTBWrapper();
     114             :     ~ScCTBWrapper();
     115             :     bool Read(SvStream &rS);
     116             :     void Print( FILE* );
     117             :     bool ImportCustomToolBar( SfxObjectShell& rDocSh );
     118             :     ScCTB* GetCustomizationData( const rtl::OUString& name );
     119             : };
     120             : 
     121             : 
     122             : #endif //_XLTOOLBAR_HXX
     123             : 
     124             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10