LCOV - code coverage report
Current view: top level - idl/inc - slot.hxx (source / functions) Hit Total Coverage
Test: commit 0e63ca4fde4e446f346e35849c756a30ca294aab Lines: 54 65 83.1 %
Date: 2014-04-11 Functions: 19 21 90.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             : #ifndef _SLOT_HXX
      21             : #define _SLOT_HXX
      22             : 
      23             : #include <types.hxx>
      24             : #include <command.hxx>
      25             : 
      26       25538 : class SvMetaSlot : public SvMetaAttribute
      27             : {
      28             :     SvMetaTypeRef   aSlotType;
      29             :     SvMetaAttributeRef aMethod;
      30             :     SvIdentifier    aGroupId;
      31             :     SvBOOL          aHasCoreId;
      32             :     SvIdentifier    aConfigId;
      33             :     SvIdentifier    aExecMethod;
      34             :     SvIdentifier    aStateMethod;
      35             :     SvIdentifier    aDefault;
      36             :     SvBOOL          aPseudoSlots;
      37             :     SvBOOL          aGet;
      38             :     SvBOOL          aSet;
      39             : 
      40             :     SvBOOL          aCachable;  // exclusive
      41             :     SvBOOL          aVolatile;
      42             :     SvBOOL          aToggle;
      43             :     SvBOOL          aAutoUpdate;
      44             : 
      45             :     SvBOOL          aSynchron;  // exclusive
      46             :     SvBOOL          aAsynchron;
      47             : 
      48             :     SvBOOL          aRecordPerItem;// exclusive
      49             :     SvBOOL          aRecordPerSet;
      50             :     SvBOOL          aRecordManual;
      51             :     SvBOOL          aNoRecord;
      52             :     SvBOOL          aRecordAbsolute;
      53             : 
      54             :     SvBOOL          aHasDialog;
      55             :     SvBOOL          aMenuConfig;
      56             :     SvBOOL          aToolBoxConfig;
      57             :     SvBOOL          aStatusBarConfig;
      58             :     SvBOOL          aAccelConfig;
      59             :     SvBOOL          aFastCall;
      60             :     SvBOOL          aContainer;
      61             :     SvBOOL          aImageRotation;
      62             :     SvBOOL          aImageReflection;
      63             :     SvIdentifier    aPseudoPrefix;
      64             :     SvString        aDisableFlags;
      65             :     SvMetaSlot*     pLinkedSlot;
      66             :     SvMetaSlot*     pNextSlot;
      67             :     sal_uLong           nListPos;
      68             :     SvMetaEnumValue* pEnumValue;
      69             :     SvString    aUnoName;
      70             : 
      71             :     void            WriteSlot( const OString& rShellName,
      72             :                             sal_uInt16 nCount, const OString& rSlotId,
      73             :                             SvSlotElementList &rList,
      74             :                             size_t nStart,
      75             :                             const OString& rPrefix,
      76             :                                SvIdlDataBase & rBase, SvStream & rOutStm );
      77             :     virtual void    Write( SvIdlDataBase & rBase,
      78             :                             SvStream & rOutStm, sal_uInt16 nTab,
      79             :                              WriteType, WriteAttribute = 0 ) SAL_OVERRIDE;
      80             : 
      81          68 :     void            SetEnumValue(SvMetaEnumValue *p)
      82          68 :                     { pEnumValue = p; }
      83             : protected:
      84       16651 :     void    SetCachable( sal_Bool bSet )
      85             :             {
      86       16651 :                 aCachable = bSet;
      87       16651 :                 if( bSet )
      88       16651 :                     aVolatile = sal_False;
      89       16651 :             }
      90           0 :     void    SetVolatile( sal_Bool bSet )
      91             :             {
      92           0 :                 aVolatile = bSet;
      93           0 :                 if( bSet )
      94           0 :                     aCachable = sal_False;
      95           0 :             }
      96        8269 :     void    SetToggle( sal_Bool bSet )
      97             :             {
      98        8269 :                 aToggle = bSet;
      99        8269 :             }
     100        8284 :     void    SetAutoUpdate( sal_Bool bSet )
     101             :             {
     102        8284 :                 aAutoUpdate = bSet;
     103        8284 :             }
     104             : 
     105        6648 :     void    SetSynchron( sal_Bool bSet )
     106             :             {
     107        6648 :                 aSynchron = bSet;
     108        6648 :                 if( bSet )
     109        6648 :                     aAsynchron = sal_False;
     110        6648 :             }
     111        1637 :     void    SetAsynchron( sal_Bool bSet )
     112             :             {
     113        1637 :                 aAsynchron = bSet;
     114        1637 :                 if( bSet )
     115        1637 :                     aSynchron = sal_False;
     116        1637 :             }
     117             : 
     118         581 :     void    SetRecordPerItem( sal_Bool bSet )
     119             :             {
     120         581 :                 aRecordPerItem = bSet;
     121         581 :                 if( bSet )
     122         581 :                     aRecordPerSet = aRecordManual = aNoRecord = sal_False;
     123         581 :             }
     124        7251 :     void    SetRecordPerSet( sal_Bool bSet )
     125             :             {
     126        7251 :                 aRecordPerSet = bSet;
     127        7251 :                 if( bSet )
     128        7251 :                     aRecordPerItem = aRecordManual = aNoRecord = sal_False;
     129        7251 :             }
     130         181 :     void    SetRecordManual( sal_Bool bSet )
     131             :             {
     132         181 :                 aRecordManual = bSet;
     133         181 :                 if( bSet )
     134         181 :                     aRecordPerItem = aRecordPerSet = aNoRecord = sal_False;
     135         181 :             }
     136          67 :     void    SetNoRecord( sal_Bool bSet )
     137             :             {
     138          67 :                 aNoRecord = bSet;
     139          67 :                 if( bSet )
     140          67 :                     aRecordPerItem = aRecordPerSet = aRecordManual = sal_False;
     141          67 :             }
     142        8079 :     void    SetRecordAbsolute( sal_Bool bSet )
     143        8079 :             { aRecordAbsolute = bSet; }
     144             :     void    SetHasDialog( sal_Bool bSet )
     145             :             { aHasDialog = bSet; }
     146             :     void    SetMenuConfig( sal_Bool bSet )
     147             :             { aMenuConfig = bSet; }
     148             :     void    SetToolBoxConfig( sal_Bool bSet )
     149             :             { aToolBoxConfig = bSet; }
     150             :     void    SetStatusBarConfig( sal_Bool bSet )
     151             :             { aStatusBarConfig = bSet; }
     152             :     void    SetAccelConfig( sal_Bool bSet )
     153             :             { aAccelConfig = bSet; }
     154           0 :     void    SetAllConfig( sal_Bool bSet )
     155             :             {
     156           0 :                 aMenuConfig     = bSet;
     157           0 :                 aToolBoxConfig  = bSet;
     158           0 :                 aStatusBarConfig = bSet;
     159           0 :                 aAccelConfig    = bSet;
     160           0 :             }
     161             :     void    SetFastCall( sal_Bool bSet )
     162             :             { aFastCall = bSet; }
     163             :     void    SetContainer( sal_Bool bSet )
     164             :             { aContainer = bSet; }
     165             :     void    SetImageRotation( sal_Bool bSet )
     166             :             { aImageRotation = bSet; }
     167             :     void    SetImageReflection( sal_Bool bSet )
     168             :             { aImageReflection = bSet; }
     169             : 
     170             : public:
     171       24669 :             SV_DECL_META_FACTORY1( SvMetaSlot, SvMetaReference, 11 )
     172             :             SvMetaObject *  MakeClone() const;
     173          68 :             SvMetaSlot *Clone() const { return (SvMetaSlot *)MakeClone(); }
     174             : 
     175             :             SvMetaSlot();
     176             :             SvMetaSlot( SvMetaType * pType );
     177             : 
     178             :     virtual sal_Bool    IsVariable() const SAL_OVERRIDE;
     179             :     virtual sal_Bool    IsMethod() const SAL_OVERRIDE;
     180             :     virtual OString GetMangleName( sal_Bool bVariable ) const SAL_OVERRIDE;
     181             : 
     182             :     SvMetaAttribute *   GetMethod() const;
     183             :     SvMetaType *        GetSlotType() const;
     184             :     sal_Bool                GetHasCoreId() const;
     185             :     const OString&     GetGroupId() const;
     186             :     const OString&     GetConfigId() const;
     187             :     const OString&     GetExecMethod() const;
     188             :     const OString&     GetStateMethod() const;
     189             :     const OString&     GetDefault() const;
     190             :     const OString&     GetDisableFlags() const;
     191             :     sal_Bool                GetPseudoSlots() const;
     192             :     sal_Bool                GetCachable() const;
     193             :     sal_Bool                GetVolatile() const;
     194             :     sal_Bool                GetToggle() const;
     195             :     sal_Bool                GetAutoUpdate() const;
     196             : 
     197             :     sal_Bool                GetSynchron() const;
     198             :     sal_Bool                GetAsynchron() const;
     199             : 
     200             :     sal_Bool                GetRecordPerItem() const;
     201             :     sal_Bool                GetRecordPerSet() const;
     202             :     sal_Bool                GetRecordManual() const;
     203             :     sal_Bool                GetNoRecord() const;
     204             :     sal_Bool                GetRecordAbsolute() const;
     205             : 
     206             :     sal_Bool                GetHasDialog() const;
     207             :     const OString&     GetPseudoPrefix() const;
     208             :     const OString&     GetUnoName() const;
     209             :     sal_Bool                GetMenuConfig() const;
     210             :     sal_Bool                GetToolBoxConfig() const;
     211             :     sal_Bool                GetStatusBarConfig() const;
     212             :     sal_Bool                GetAccelConfig() const;
     213             :     sal_Bool                GetFastCall() const;
     214             :     sal_Bool                GetContainer() const;
     215             :     sal_Bool                GetImageRotation() const;
     216             :     sal_Bool                GetImageReflection() const;
     217             :     SvMetaSlot*         GetLinkedSlot() const
     218             :                         { return pLinkedSlot; }
     219             :     SvMetaSlot*         GetNextSlot() const
     220             :                         { return pNextSlot; }
     221        5951 :     sal_uLong               GetListPos() const
     222        5951 :                         { return nListPos; }
     223        5878 :     void                SetListPos(sal_uLong n)
     224        5878 :                         { nListPos = n; }
     225        5878 :     void                ResetSlotPointer()
     226        5878 :                         { pNextSlot = pLinkedSlot = 0; }
     227             : 
     228             :     SvMetaEnumValue*    GetEnumValue() const
     229             :                         { return pEnumValue; }
     230             :     virtual sal_Bool        Test( SvIdlDataBase &, SvTokenStream & rInStm ) SAL_OVERRIDE;
     231             :     virtual void        ReadAttributesSvIdl( SvIdlDataBase & rBase,
     232             :                                              SvTokenStream & rInStm ) SAL_OVERRIDE;
     233             :     virtual void        WriteAttributesSvIdl( SvIdlDataBase & rBase,
     234             :                                               SvStream & rOutStm, sal_uInt16 nTab ) SAL_OVERRIDE;
     235             :     virtual sal_Bool        ReadSvIdl( SvIdlDataBase &, SvTokenStream & rInStm ) SAL_OVERRIDE;
     236             :     virtual void        WriteSvIdl( SvIdlDataBase & rBase,
     237             :                                     SvStream & rOutStm, sal_uInt16 nTab ) SAL_OVERRIDE;
     238             :     virtual void        Insert( SvSlotElementList&, const OString& rPrefix,
     239             :                                 SvIdlDataBase& ) SAL_OVERRIDE;
     240             :     void                WriteSlotStubs( const OString& rShellName,
     241             :                                     ByteStringList & rList,
     242             :                                     SvStream & rOutStm );
     243             :     sal_uInt16          WriteSlotMap( const OString& rShellName,
     244             :                                     sal_uInt16 nCount,
     245             :                                     SvSlotElementList&,
     246             :                                     size_t nStart,
     247             :                                     const OString&,
     248             :                                     SvIdlDataBase & rBase,
     249             :                                     SvStream & rOutStm );
     250             :     sal_uInt16              WriteSlotParamArray( SvIdlDataBase & rBase,
     251             :                                             SvStream & rOutStm );
     252             :     virtual void        WriteHelpId( SvIdlDataBase & rBase, SvStream & rOutStm,
     253             :                                   HelpIdTable& rIdTable ) SAL_OVERRIDE;
     254             :     virtual void        WriteCSV( SvIdlDataBase&, SvStream& ) SAL_OVERRIDE;
     255             : };
     256             : typedef tools::SvRef<SvMetaSlot> SvMetaSlotRef;
     257             : 
     258             : class SvMetaSlotMemberList : public SvDeclPersistList<SvMetaSlot *> {};
     259             : 
     260             : #endif // _SLOT_HXX
     261             : 
     262             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10