LCOV - code coverage report
Current view: top level - idl/source/objects - slot.cxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 718 930 77.2 %
Date: 2012-08-25 Functions: 52 63 82.5 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 1178 2254 52.3 %

           Branch data     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                 :            : 
      21                 :            : #include <ctype.h>
      22                 :            : #include <stdio.h>
      23                 :            : #include <rtl/strbuf.hxx>
      24                 :            : #include <tools/debug.hxx>
      25                 :            : #include <slot.hxx>
      26                 :            : #include <globals.hxx>
      27                 :            : #include <database.hxx>
      28                 :            : 
      29 [ #  # ][ #  # ]:      78366 : SV_IMPL_META_FACTORY1( SvMetaSlot, SvMetaAttribute );
         [ #  # ][ #  # ]
         [ #  # ][ +  - ]
                 [ #  # ]
      30                 :            : 
      31                 :        136 : SvMetaObject *SvMetaSlot::MakeClone() const
      32                 :            : {
      33         [ +  - ]:        136 :         return new SvMetaSlot( *this );
      34                 :            : }
      35                 :            : 
      36                 :      16340 : SvMetaSlot::SvMetaSlot()
      37                 :            :     : aCachable( sal_True, sal_False )
      38                 :            :     , aSynchron( sal_True, sal_False )
      39                 :            :     , aRecordPerSet( sal_True, sal_False )
      40                 :            :     , aRecordAbsolute( sal_False, sal_False )
      41                 :            :     , pLinkedSlot(0)
      42                 :            :     , pNextSlot(0)
      43                 :      16340 :     , pEnumValue(0)
      44                 :            : {
      45                 :      16340 : }
      46                 :            : 
      47                 :       7982 : SvMetaSlot::SvMetaSlot( SvMetaType * pType )
      48                 :            :     : SvMetaAttribute( pType )
      49                 :            :     , aCachable( sal_True, sal_False )
      50                 :            :     , aSynchron( sal_True, sal_False )
      51                 :            :     , aRecordPerSet( sal_True, sal_False )
      52                 :            :     , aRecordAbsolute( sal_False, sal_False )
      53                 :            :     , pLinkedSlot(0)
      54                 :            :     , pNextSlot(0)
      55                 :       7982 :     , pEnumValue(0)
      56                 :            : {
      57                 :       7982 : }
      58                 :            : 
      59                 :            : #define TEST_READ
      60                 :            : #define TEST_WRITE
      61                 :            : 
      62                 :          0 : void SvMetaSlot::Load( SvPersistStream & rStm )
      63                 :            : {
      64         [ #  # ]:          0 :     SvMetaAttribute::Load( rStm );
      65                 :            : 
      66                 :            :     sal_uInt16 nMask;
      67         [ #  # ]:          0 :     rStm >> nMask;
      68                 :            : 
      69                 :            :     TEST_READ
      70         [ #  # ]:          0 :     if( nMask & 0x0001 )
      71                 :            :     {
      72                 :            :         SvMetaAttribute * pMeth;
      73         [ #  # ]:          0 :         rStm >> pMeth;
      74         [ #  # ]:          0 :         aMethod = pMeth;
      75                 :            :     }
      76                 :            : 
      77                 :            :     TEST_READ
      78 [ #  # ][ #  # ]:          0 :     if( nMask & 0x0002 ) rStm >> aGroupId;
      79                 :            :     TEST_READ
      80 [ #  # ][ #  # ]:          0 :     if( nMask & 0x0004 ) rStm >> aHasCoreId;
      81                 :            :     TEST_READ
      82 [ #  # ][ #  # ]:          0 :     if( nMask & 0x0008 ) rStm >> aConfigId;
      83                 :            :     TEST_READ
      84 [ #  # ][ #  # ]:          0 :     if( nMask & 0x0010 ) rStm >> aExecMethod;
      85                 :            :     TEST_READ
      86 [ #  # ][ #  # ]:          0 :     if( nMask & 0x0020 ) rStm >> aStateMethod;
      87                 :            :     TEST_READ
      88 [ #  # ][ #  # ]:          0 :     if( nMask & 0x0040 ) rStm >> aDefault;
      89                 :            :     TEST_READ
      90 [ #  # ][ #  # ]:          0 :     if( nMask & 0x0080 ) rStm >> aPseudoSlots;
      91                 :            :     TEST_READ
      92 [ #  # ][ #  # ]:          0 :     if( nMask & 0x0100 ) rStm >> aGet;
      93                 :            :     TEST_READ
      94 [ #  # ][ #  # ]:          0 :     if( nMask & 0x0200 ) rStm >> aSet;
      95                 :            :     TEST_READ
      96 [ #  # ][ #  # ]:          0 :     if( nMask & 0x0400 ) rStm >> aCachable;
      97                 :            :     TEST_READ
      98 [ #  # ][ #  # ]:          0 :     if( nMask & 0x0800 ) rStm >> aVolatile;
      99                 :            :     TEST_READ
     100 [ #  # ][ #  # ]:          0 :     if( nMask & 0x1000 ) rStm >> aToggle;
     101                 :            :     TEST_READ
     102 [ #  # ][ #  # ]:          0 :     if( nMask & 0x2000 ) rStm >> aAutoUpdate;
     103                 :            :     TEST_READ
     104 [ #  # ][ #  # ]:          0 :     if( nMask & 0x4000 ) rStm >> aSynchron;
     105                 :            :     TEST_READ
     106 [ #  # ][ #  # ]:          0 :     if( nMask & 0x8000 ) rStm >> aAsynchron;
     107                 :            : 
     108                 :          0 :     nMask = 0;
     109         [ #  # ]:          0 :     rStm >> nMask;
     110                 :            : 
     111                 :            :     TEST_READ
     112 [ #  # ][ #  # ]:          0 :     if( nMask & 0x0001 ) rStm >> aRecordPerItem;
     113                 :            :     TEST_READ
     114 [ #  # ][ #  # ]:          0 :     if( nMask & 0x0002 ) rStm >> aRecordManual;
     115                 :            :     TEST_READ
     116 [ #  # ][ #  # ]:          0 :     if( nMask & 0x0004 ) rStm >> aNoRecord;
     117                 :            :     TEST_READ
     118 [ #  # ][ #  # ]:          0 :     if( nMask & 0x0008 ) rStm >> aHasDialog;
     119                 :            :     TEST_READ
     120 [ #  # ][ #  # ]:          0 :     if( nMask & 0x0010 ) rStm >> aDisableFlags;
     121                 :            :     TEST_READ
     122 [ #  # ][ #  # ]:          0 :     if( nMask & 0x0020 ) rStm >> aPseudoPrefix;
     123                 :            :     TEST_READ
     124 [ #  # ][ #  # ]:          0 :     if( nMask & 0x0040 ) rStm >> aRecordPerSet;
     125                 :            :     TEST_READ
     126 [ #  # ][ #  # ]:          0 :     if( nMask & 0x0080 ) rStm >> aMenuConfig;
     127                 :            :     TEST_READ
     128 [ #  # ][ #  # ]:          0 :     if( nMask & 0x0100 ) rStm >> aToolBoxConfig;
     129                 :            :     TEST_READ
     130 [ #  # ][ #  # ]:          0 :     if( nMask & 0x0200 ) rStm >> aStatusBarConfig;
     131                 :            :     TEST_READ
     132 [ #  # ][ #  # ]:          0 :     if( nMask & 0x0400 ) rStm >> aAccelConfig;
     133                 :            :     TEST_READ
     134 [ #  # ][ #  # ]:          0 :     if( nMask & 0x0800 ) rStm >> aFastCall;
     135                 :            :     TEST_READ
     136 [ #  # ][ #  # ]:          0 :     if( nMask & 0x1000 ) rStm >> aContainer;
     137                 :            :     TEST_READ
     138                 :            : 
     139         [ #  # ]:          0 :     if( nMask & 0x2000 )
     140                 :            :     {
     141                 :            :         SvMetaType * pT;
     142         [ #  # ]:          0 :         rStm >> pT;
     143         [ #  # ]:          0 :         aSlotType = pT;
     144                 :            :     }
     145                 :            : 
     146                 :            :     TEST_READ
     147 [ #  # ][ #  # ]:          0 :     if( nMask & 0x4000 ) rStm >> aRecordAbsolute;
     148                 :            :     TEST_READ
     149 [ #  # ][ #  # ]:          0 :     if( nMask & 0x8000 ) rStm >> aImageRotation;
     150                 :            : 
     151                 :          0 :     nMask = 0;
     152         [ #  # ]:          0 :     rStm >> nMask;
     153                 :            : 
     154                 :            :     TEST_READ
     155 [ #  # ][ #  # ]:          0 :     if( nMask & 0x0001 ) rStm >> aUnoName;
     156 [ #  # ][ #  # ]:          0 :     if( nMask & 0x0002 ) rStm >> aImageReflection;
     157                 :          0 : }
     158                 :            : 
     159                 :      23654 : void SvMetaSlot::Save( SvPersistStream & rStm )
     160                 :            : {
     161                 :      23654 :     SvMetaAttribute::Save( rStm );
     162                 :            : 
     163                 :            :     // create mask
     164                 :      23654 :     sal_uInt16 nMask = 0;
     165         [ +  + ]:      23654 :     if( aMethod.Is() )          nMask |= 0x0001;
     166         [ +  + ]:      23654 :     if( !aGroupId.getString().isEmpty() )       nMask |= 0x0002;
     167         [ +  + ]:      23654 :     if( aHasCoreId.IsSet() )    nMask |= 0x0004;
     168         [ -  + ]:      23654 :     if( !aConfigId.getString().isEmpty() )      nMask |= 0x0008;
     169         [ +  + ]:      23654 :     if( !aExecMethod.getString().isEmpty() )    nMask |= 0x0010;
     170         [ +  + ]:      23654 :     if( !aStateMethod.getString().isEmpty() )   nMask |= 0x0020;
     171         [ -  + ]:      23654 :     if( !aDefault.getString().isEmpty() )       nMask |= 0x0040;
     172         [ +  + ]:      23654 :     if( aPseudoSlots.IsSet() )  nMask |= 0x0080;
     173         [ -  + ]:      23654 :     if( aGet.IsSet() )          nMask |= 0x0100;
     174         [ -  + ]:      23654 :     if( aSet.IsSet() )          nMask |= 0x0200;
     175         [ +  + ]:      23654 :     if( aCachable.IsSet() )     nMask |= 0x0400;
     176         [ +  + ]:      23654 :     if( aVolatile.IsSet() )     nMask |= 0x0800;
     177         [ +  + ]:      23654 :     if( aToggle.IsSet() )       nMask |= 0x1000;
     178         [ +  + ]:      23654 :     if( aAutoUpdate.IsSet() )   nMask |= 0x2000;
     179         [ +  + ]:      23654 :     if( aSynchron.IsSet() )     nMask |= 0x4000;
     180         [ +  + ]:      23654 :     if( aAsynchron.IsSet() )    nMask |= 0x8000;
     181                 :            : 
     182                 :            :     // write data
     183                 :      23654 :     rStm << nMask;
     184                 :            :     TEST_WRITE
     185         [ +  + ]:      23654 :     if( nMask & 0x0001 ) rStm << aMethod;
     186                 :            :     TEST_WRITE
     187         [ +  + ]:      23654 :     if( nMask & 0x0002 ) rStm << aGroupId;
     188                 :            :     TEST_WRITE
     189         [ +  + ]:      23654 :     if( nMask & 0x0004 ) rStm << aHasCoreId;
     190                 :            :     TEST_WRITE
     191         [ -  + ]:      23654 :     if( nMask & 0x0008 ) rStm << aConfigId;
     192                 :            :     TEST_WRITE
     193         [ +  + ]:      23654 :     if( nMask & 0x0010 ) rStm << aExecMethod;
     194                 :            :     TEST_WRITE
     195         [ +  + ]:      23654 :     if( nMask & 0x0020 ) rStm << aStateMethod;
     196                 :            :     TEST_WRITE
     197         [ -  + ]:      23654 :     if( nMask & 0x0040 ) rStm << aDefault;
     198                 :            :     TEST_WRITE
     199         [ +  + ]:      23654 :     if( nMask & 0x0080 ) rStm << aPseudoSlots;
     200                 :            :     TEST_WRITE
     201         [ -  + ]:      23654 :     if( nMask & 0x0100 ) rStm << aGet;
     202                 :            :     TEST_WRITE
     203         [ -  + ]:      23654 :     if( nMask & 0x0200 ) rStm << aSet;
     204                 :            :     TEST_WRITE
     205         [ +  + ]:      23654 :     if( nMask & 0x0400 ) rStm << aCachable;
     206                 :            :     TEST_WRITE
     207         [ +  + ]:      23654 :     if( nMask & 0x0800 ) rStm << aVolatile;
     208                 :            :     TEST_WRITE
     209         [ +  + ]:      23654 :     if( nMask & 0x1000 ) rStm << aToggle;
     210                 :            :     TEST_WRITE
     211         [ +  + ]:      23654 :     if( nMask & 0x2000 ) rStm << aAutoUpdate;
     212                 :            :     TEST_WRITE
     213         [ +  + ]:      23654 :     if( nMask & 0x4000 ) rStm << aSynchron;
     214                 :            :     TEST_WRITE
     215         [ +  + ]:      23654 :     if( nMask & 0x8000 ) rStm << aAsynchron;
     216                 :            : 
     217                 :            :     // write next bunch
     218                 :            :     // create mask
     219                 :      23654 :     nMask = 0;
     220         [ +  + ]:      23654 :     if( aRecordPerItem.IsSet() )  nMask |= 0x0001;
     221         [ +  + ]:      23654 :     if( aRecordManual.IsSet() )   nMask |= 0x0002;
     222         [ +  + ]:      23654 :     if( aNoRecord.IsSet() )       nMask |= 0x0004;
     223         [ +  + ]:      23654 :     if( aHasDialog.IsSet() )      nMask |= 0x0008;
     224         [ +  + ]:      23654 :     if ( aDisableFlags.IsSet() )      nMask |= 0x0010;
     225         [ +  + ]:      23654 :     if( !aPseudoPrefix.getString().isEmpty() )    nMask |= 0x0020;
     226         [ +  + ]:      23654 :     if( aRecordPerSet.IsSet() )   nMask |= 0x0040;
     227         [ +  + ]:      23654 :     if( aMenuConfig.IsSet() )     nMask |= 0x0080;
     228         [ +  + ]:      23654 :     if( aToolBoxConfig.IsSet() )  nMask |= 0x0100;
     229         [ +  + ]:      23654 :     if( aStatusBarConfig.IsSet() )nMask |= 0x0200;
     230         [ +  + ]:      23654 :     if( aAccelConfig.IsSet() )    nMask |= 0x0400;
     231         [ +  + ]:      23654 :     if( aFastCall.IsSet() )       nMask |= 0x0800;
     232         [ +  + ]:      23654 :     if( aContainer.IsSet() )      nMask |= 0x1000;
     233         [ +  + ]:      23654 :     if( aSlotType.Is() )          nMask |= 0x2000;
     234         [ +  + ]:      23654 :     if( aRecordAbsolute.IsSet() ) nMask |= 0x4000;
     235         [ +  + ]:      23654 :     if( aImageRotation.IsSet() )       nMask |= 0x8000;
     236                 :            : 
     237                 :            :     // write data
     238                 :      23654 :     rStm << nMask;
     239                 :            :     TEST_WRITE
     240         [ +  + ]:      23654 :     if( nMask & 0x0001 ) rStm << aRecordPerItem;
     241                 :            :     TEST_WRITE
     242         [ +  + ]:      23654 :     if( nMask & 0x0002 ) rStm << aRecordManual;
     243                 :            :     TEST_WRITE
     244         [ +  + ]:      23654 :     if( nMask & 0x0004 ) rStm << aNoRecord;
     245                 :            :     TEST_WRITE
     246         [ +  + ]:      23654 :     if( nMask & 0x0008 ) rStm << aHasDialog;
     247                 :            :     TEST_WRITE
     248         [ +  + ]:      23654 :     if( nMask & 0x0010 ) rStm << aDisableFlags;
     249                 :            :     TEST_WRITE
     250         [ +  + ]:      23654 :     if( nMask & 0x0020 ) rStm << aPseudoPrefix;
     251                 :            :     TEST_WRITE
     252         [ +  + ]:      23654 :     if( nMask & 0x0040 ) rStm << aRecordPerSet;
     253                 :            :     TEST_WRITE
     254         [ +  + ]:      23654 :     if( nMask & 0x0080 ) rStm << aMenuConfig;
     255                 :            :     TEST_WRITE
     256         [ +  + ]:      23654 :     if( nMask & 0x0100 ) rStm << aToolBoxConfig;
     257                 :            :     TEST_WRITE
     258         [ +  + ]:      23654 :     if( nMask & 0x0200 ) rStm << aStatusBarConfig;
     259                 :            :     TEST_WRITE
     260         [ +  + ]:      23654 :     if( nMask & 0x0400 ) rStm << aAccelConfig;
     261                 :            :     TEST_WRITE
     262         [ +  + ]:      23654 :     if( nMask & 0x0800 ) rStm << aFastCall;
     263                 :            :     TEST_WRITE
     264         [ +  + ]:      23654 :     if( nMask & 0x1000 ) rStm << aContainer;
     265                 :            :     TEST_WRITE
     266         [ +  + ]:      23654 :     if( nMask & 0x2000 ) rStm << aSlotType;
     267                 :            :     TEST_WRITE
     268         [ +  + ]:      23654 :     if( nMask & 0x4000 ) rStm << aRecordAbsolute;
     269                 :            :     TEST_WRITE
     270         [ +  + ]:      23654 :     if( nMask & 0x8000 ) rStm << aImageRotation;
     271                 :            : 
     272                 :      23654 :     nMask = 0;
     273         [ -  + ]:      23654 :     if( aUnoName.IsSet() )          nMask |= 0x0001;
     274         [ +  + ]:      23654 :     if( aImageReflection.IsSet() )  nMask |= 0x0002;
     275                 :      23654 :     rStm << nMask;
     276                 :            :     TEST_WRITE
     277         [ -  + ]:      23654 :     if( nMask & 0x0001 ) rStm << aUnoName;
     278                 :            :     TEST_WRITE
     279         [ +  + ]:      23654 :     if( nMask & 0x0002 ) rStm << aImageReflection;
     280                 :      23654 : }
     281                 :            : 
     282                 :      30484 : sal_Bool SvMetaSlot::IsVariable() const
     283                 :            : {
     284                 :      30484 :     return SvMetaAttribute::IsVariable();
     285                 :            : }
     286                 :            : 
     287                 :      43596 : sal_Bool SvMetaSlot::IsMethod() const
     288                 :            : {
     289                 :      43596 :     sal_Bool b = SvMetaAttribute::IsMethod();
     290                 :      43596 :     b |= NULL != GetMethod();
     291                 :      43596 :     return b;
     292                 :            : }
     293                 :            : 
     294                 :      20230 : rtl::OString SvMetaSlot::GetMangleName( sal_Bool bVariable ) const
     295                 :            : {
     296         [ +  - ]:      20230 :     if( !bVariable )
     297                 :            :     {
     298                 :      20230 :         SvMetaAttribute * pMeth = GetMethod();
     299         [ +  + ]:      20230 :         if( pMeth )
     300                 :         80 :             return pMeth->GetName().getString();
     301                 :            :     }
     302                 :      20230 :     return GetName().getString();
     303                 :            : }
     304                 :            : 
     305                 :            : /*************************************************************************
     306                 :            : |*    reference
     307                 :            : |*
     308                 :            : |*    description       Second FALSE in the SvBOOL-Objects means
     309                 :            : |*                      IsSet() provides FALSE (default initialization).
     310                 :            : *************************************************************************/
     311                 :            : /** reference disbandment **/
     312                 :      21626 : SvMetaType * SvMetaSlot::GetSlotType() const
     313                 :            : {
     314 [ +  + ][ +  + ]:      21626 :     if( aSlotType.Is() || !GetRef() ) return aSlotType;
                 [ +  + ]
     315                 :      21626 :     return ((SvMetaSlot *)GetRef())->GetSlotType();
     316                 :            : }
     317                 :     174950 : SvMetaAttribute * SvMetaSlot::GetMethod() const
     318                 :            : {
     319 [ +  + ][ +  + ]:     174950 :     if( aMethod.Is() || !GetRef() ) return aMethod;
                 [ +  + ]
     320                 :     174950 :     return ((SvMetaSlot *)GetRef())->GetMethod();
     321                 :            : }
     322                 :      21772 : sal_Bool SvMetaSlot::GetHasCoreId() const
     323                 :            : {
     324 [ +  + ][ -  + ]:      21772 :     if( aHasCoreId.IsSet() || !GetRef() ) return aHasCoreId;
                 [ +  + ]
     325                 :      21772 :     return ((SvMetaSlot *)GetRef())->GetHasCoreId();
     326                 :            : }
     327                 :      42692 : const rtl::OString& SvMetaSlot::GetGroupId() const
     328                 :            : {
     329 [ +  + ][ +  + ]:      42692 :     if( !aGroupId.getString().isEmpty() || !GetRef() ) return aGroupId.getString();
                 [ +  + ]
     330                 :      42692 :     return ((SvMetaSlot *)GetRef())->GetGroupId();
     331                 :            : }
     332                 :      21772 : const rtl::OString& SvMetaSlot::GetDisableFlags() const
     333                 :            : {
     334 [ +  + ][ +  + ]:      21772 :     if( !aDisableFlags.getString().isEmpty() || !GetRef() ) return aDisableFlags.getString();
                 [ +  + ]
     335                 :      21772 :     return ((SvMetaSlot *)GetRef())->GetDisableFlags();
     336                 :            : }
     337                 :          0 : const rtl::OString& SvMetaSlot::GetConfigId() const
     338                 :            : {
     339 [ #  # ][ #  # ]:          0 :     if( !aConfigId.getString().isEmpty() || !GetRef() ) return aConfigId.getString();
                 [ #  # ]
     340                 :          0 :     return ((SvMetaSlot *)GetRef())->GetConfigId();
     341                 :            : }
     342                 :      43394 : const rtl::OString& SvMetaSlot::GetExecMethod() const
     343                 :            : {
     344 [ +  + ][ +  + ]:      43394 :     if( !aExecMethod.getString().isEmpty() || !GetRef() ) return aExecMethod.getString();
                 [ +  + ]
     345                 :      43394 :     return ((SvMetaSlot *)GetRef())->GetExecMethod();
     346                 :            : }
     347                 :     288598 : const rtl::OString& SvMetaSlot::GetStateMethod() const
     348                 :            : {
     349 [ +  + ][ +  + ]:     288598 :     if( !aStateMethod.getString().isEmpty() || !GetRef() ) return aStateMethod.getString();
                 [ +  + ]
     350                 :     288598 :     return ((SvMetaSlot *)GetRef())->GetStateMethod();
     351                 :            : }
     352                 :          0 : const rtl::OString& SvMetaSlot::GetDefault() const
     353                 :            : {
     354 [ #  # ][ #  # ]:          0 :     if( !aDefault.getString().isEmpty() || !GetRef() ) return aDefault.getString();
                 [ #  # ]
     355                 :          0 :     return ((SvMetaSlot *)GetRef())->GetDefault();
     356                 :            : }
     357                 :      52984 : sal_Bool SvMetaSlot::GetPseudoSlots() const
     358                 :            : {
     359 [ +  + ][ +  + ]:      52984 :     if( aPseudoSlots.IsSet() || !GetRef() ) return aPseudoSlots;
                 [ +  + ]
     360                 :      52984 :     return ((SvMetaSlot *)GetRef())->GetPseudoSlots();
     361                 :            : }
     362                 :      21474 : sal_Bool SvMetaSlot::GetCachable() const
     363                 :            : {
     364                 :            :     // Cachable and Volatile are exclusive
     365 [ +  + ][ +  + ]:      21474 :     if( !GetRef() || aCachable.IsSet() || aVolatile.IsSet() )
         [ -  + ][ +  + ]
     366                 :      10954 :          return aCachable;
     367                 :      21474 :     return ((SvMetaSlot *)GetRef())->GetCachable();
     368                 :            : }
     369                 :      21474 : sal_Bool SvMetaSlot::GetVolatile() const
     370                 :            : {
     371                 :            :     // Cachable and Volatile are exclusive
     372 [ +  + ][ +  + ]:      21474 :     if( !GetRef() || aVolatile.IsSet() || aCachable.IsSet() )
         [ -  + ][ +  + ]
     373                 :      10954 :         return aVolatile;
     374                 :      21474 :     return ((SvMetaSlot *)GetRef())->GetVolatile();
     375                 :            : }
     376                 :      21770 : sal_Bool SvMetaSlot::GetToggle() const
     377                 :            : {
     378 [ +  + ][ -  + ]:      21770 :     if( aToggle.IsSet() || !GetRef() ) return aToggle;
                 [ +  + ]
     379                 :      21770 :     return ((SvMetaSlot *)GetRef())->GetToggle();
     380                 :            : }
     381                 :      21730 : sal_Bool SvMetaSlot::GetAutoUpdate() const
     382                 :            : {
     383 [ +  + ][ -  + ]:      21730 :     if( aAutoUpdate.IsSet() || !GetRef() ) return aAutoUpdate;
                 [ +  + ]
     384                 :      21730 :     return ((SvMetaSlot *)GetRef())->GetAutoUpdate();
     385                 :            : }
     386                 :      21728 : sal_Bool SvMetaSlot::GetSynchron() const
     387                 :            : {
     388                 :            :     // Synchron and Asynchron are exclusive
     389 [ +  + ][ +  + ]:      21728 :     if( !GetRef() || aSynchron.IsSet() || aAsynchron.IsSet() )
         [ -  + ][ +  + ]
     390                 :      10954 :         return aSynchron;
     391                 :      21728 :     return ((SvMetaSlot *)GetRef())->GetSynchron();
     392                 :            : }
     393                 :      21728 : sal_Bool SvMetaSlot::GetAsynchron() const
     394                 :            : {
     395                 :            :     // Synchron and Asynchron are exclusive
     396 [ +  + ][ +  + ]:      21728 :     if( !GetRef() || aAsynchron.IsSet() || aSynchron.IsSet() )
         [ -  + ][ +  + ]
     397                 :      10954 :         return aAsynchron;
     398                 :      21728 :     return ((SvMetaSlot *)GetRef())->GetAsynchron();
     399                 :            : }
     400                 :      21770 : sal_Bool SvMetaSlot::GetRecordPerItem() const
     401                 :            : {
     402                 :            :     // Record- PerItem, No, PerSet and Manual are exclusive
     403 [ +  + ][ +  + ]:      43402 :     if( !GetRef() || aRecordPerItem.IsSet() || aNoRecord.IsSet()
           [ +  -  +  -  
           -  + ][ +  + ]
     404                 :      21632 :       || aRecordPerSet.IsSet() || aRecordManual.IsSet() )
     405                 :      10954 :         return aRecordPerItem;
     406                 :      21770 :     return ((SvMetaSlot *)GetRef())->GetRecordPerItem();
     407                 :            : }
     408                 :      21770 : sal_Bool SvMetaSlot::GetRecordPerSet() const
     409                 :            : {
     410                 :            :     // Record- PerItem, No, PerSet and Manual are exclusive
     411 [ +  + ][ +  + ]:      43402 :     if( !GetRef() || aRecordPerItem.IsSet() || aNoRecord.IsSet()
           [ +  -  +  -  
           -  + ][ +  + ]
     412                 :      21632 :       || aRecordPerSet.IsSet() || aRecordManual.IsSet() )
     413                 :      10954 :         return aRecordPerSet;
     414                 :      21770 :     return ((SvMetaSlot *)GetRef())->GetRecordPerSet();
     415                 :            : }
     416                 :      21770 : sal_Bool SvMetaSlot::GetRecordManual() const
     417                 :            : {
     418                 :            :     // Record- PerItem, No, PerSet and Manual are exclusive
     419 [ +  + ][ +  + ]:      43402 :     if( !GetRef() || aRecordPerItem.IsSet() || aNoRecord.IsSet()
           [ +  -  +  -  
           -  + ][ +  + ]
     420                 :      21632 :       || aRecordPerSet.IsSet() || aRecordManual.IsSet() )
     421                 :      10954 :         return aRecordManual;
     422                 :      21770 :     return ((SvMetaSlot *)GetRef())->GetRecordManual();
     423                 :            : }
     424                 :      21770 : sal_Bool SvMetaSlot::GetNoRecord() const
     425                 :            : {
     426                 :            :     // Record- PerItem, No, PerSet and Manual are exclusive
     427 [ +  + ][ +  + ]:      43402 :     if( !GetRef() || aRecordPerItem.IsSet() || aNoRecord.IsSet()
           [ +  -  +  -  
           -  + ][ +  + ]
     428                 :      21632 :       || aRecordPerSet.IsSet() || aRecordManual.IsSet() )
     429                 :      10954 :         return aNoRecord;
     430                 :      21770 :     return ((SvMetaSlot *)GetRef())->GetNoRecord();
     431                 :            : }
     432                 :      21772 : sal_Bool SvMetaSlot::GetRecordAbsolute() const
     433                 :            : {
     434 [ +  + ][ -  + ]:      21772 :     if( !GetRef() || aRecordAbsolute.IsSet() )
                 [ +  + ]
     435                 :      10954 :         return aRecordAbsolute;
     436                 :      21772 :     return ((SvMetaSlot *)GetRef())->GetRecordAbsolute();
     437                 :            : }
     438                 :      21742 : sal_Bool SvMetaSlot::GetHasDialog() const
     439                 :            : {
     440 [ +  + ][ +  + ]:      21742 :     if( aHasDialog.IsSet() || !GetRef() ) return aHasDialog;
                 [ +  + ]
     441                 :      21742 :     return ((SvMetaSlot *)GetRef())->GetHasDialog();
     442                 :            : }
     443                 :        544 : const rtl::OString& SvMetaSlot::GetPseudoPrefix() const
     444                 :            : {
     445 [ +  + ][ -  + ]:        544 :     if( !aPseudoPrefix.getString().isEmpty() || !GetRef() ) return aPseudoPrefix.getString();
                 [ +  + ]
     446                 :        544 :     return ((SvMetaSlot *)GetRef())->GetPseudoPrefix();
     447                 :            : }
     448                 :      21686 : sal_Bool SvMetaSlot::GetMenuConfig() const
     449                 :            : {
     450 [ +  + ][ -  + ]:      21686 :     if( aMenuConfig.IsSet() || !GetRef() ) return aMenuConfig;
                 [ +  + ]
     451                 :      21686 :     return ((SvMetaSlot *)GetRef())->GetMenuConfig();
     452                 :            : }
     453                 :      21702 : sal_Bool SvMetaSlot::GetToolBoxConfig() const
     454                 :            : {
     455 [ +  + ][ -  + ]:      21702 :     if( aToolBoxConfig.IsSet() || !GetRef() ) return aToolBoxConfig;
                 [ +  + ]
     456                 :      21702 :     return ((SvMetaSlot *)GetRef())->GetToolBoxConfig();
     457                 :            : }
     458                 :      21770 : sal_Bool SvMetaSlot::GetStatusBarConfig() const
     459                 :            : {
     460 [ +  + ][ -  + ]:      21770 :     if( aStatusBarConfig.IsSet() || !GetRef() ) return aStatusBarConfig;
                 [ +  + ]
     461                 :      21770 :     return ((SvMetaSlot *)GetRef())->GetStatusBarConfig();
     462                 :            : }
     463                 :      21710 : sal_Bool SvMetaSlot::GetAccelConfig() const
     464                 :            : {
     465 [ +  + ][ -  + ]:      21710 :     if( aAccelConfig.IsSet() || !GetRef() ) return aAccelConfig;
                 [ +  + ]
     466                 :      21710 :     return ((SvMetaSlot *)GetRef())->GetAccelConfig();
     467                 :            : }
     468                 :      21734 : sal_Bool SvMetaSlot::GetFastCall() const
     469                 :            : {
     470 [ +  + ][ -  + ]:      21734 :     if( aFastCall.IsSet() || !GetRef() ) return aFastCall;
                 [ +  + ]
     471                 :      21734 :     return ((SvMetaSlot *)GetRef())->GetFastCall();
     472                 :            : }
     473                 :      21768 : sal_Bool SvMetaSlot::GetContainer() const
     474                 :            : {
     475 [ +  + ][ -  + ]:      21768 :     if( aContainer.IsSet() || !GetRef() ) return aContainer;
                 [ +  + ]
     476                 :      21768 :     return ((SvMetaSlot *)GetRef())->GetContainer();
     477                 :            : }
     478                 :            : 
     479                 :      21772 : sal_Bool SvMetaSlot::GetImageRotation() const
     480                 :            : {
     481 [ +  + ][ +  + ]:      21772 :     if( aImageRotation.IsSet() || !GetRef() ) return aImageRotation;
                 [ +  + ]
     482                 :      21772 :     return ((SvMetaSlot *)GetRef())->GetImageRotation();
     483                 :            : }
     484                 :            : 
     485                 :      21772 : sal_Bool SvMetaSlot::GetImageReflection() const
     486                 :            : {
     487 [ +  + ][ +  + ]:      21772 :     if( aImageReflection.IsSet() || !GetRef() ) return aImageReflection;
                 [ +  + ]
     488                 :      21772 :     return ((SvMetaSlot *)GetRef())->GetImageReflection();
     489                 :            : }
     490                 :            : 
     491                 :          0 : const rtl::OString& SvMetaSlot::GetUnoName() const
     492                 :            : {
     493 [ #  # ][ #  # ]:          0 :     if( aUnoName.IsSet() || !GetRef() ) return aUnoName.getString();
                 [ #  # ]
     494                 :          0 :     return ((SvMetaSlot *)GetRef())->GetUnoName();
     495                 :            : }
     496                 :            : 
     497                 :     320510 : void SvMetaSlot::ReadAttributesSvIdl( SvIdlDataBase & rBase,
     498                 :            :                                     SvTokenStream & rInStm )
     499                 :            : {
     500         [ +  - ]:     320510 :     SvMetaAttribute::ReadAttributesSvIdl( rBase, rInStm );
     501                 :            : 
     502                 :     320510 :     sal_Bool bOk = sal_False;
     503 [ +  - ][ +  - ]:     320510 :     bOk |= aDefault.ReadSvIdl( SvHash_Default(), rInStm );
     504 [ +  - ][ +  - ]:     320510 :     bOk |= aPseudoSlots.ReadSvIdl( SvHash_PseudoSlots(), rInStm );
     505 [ +  - ][ +  - ]:     320510 :     bOk |= aHasCoreId.ReadSvIdl( SvHash_HasCoreId(), rInStm );
     506 [ +  - ][ +  - ]:     320510 :     bOk |= aGroupId.ReadSvIdl( SvHash_GroupId(), rInStm );
     507 [ +  - ][ +  - ]:     320510 :     bOk |= aExecMethod.ReadSvIdl( SvHash_ExecMethod(), rInStm );
     508 [ +  - ][ +  - ]:     320510 :     bOk |= aStateMethod.ReadSvIdl( SvHash_StateMethod(), rInStm );
     509 [ +  - ][ +  - ]:     320510 :     bOk |= aDisableFlags.ReadSvIdl( SvHash_DisableFlags(), rInStm );
     510 [ +  - ][ +  - ]:     320510 :     if( aGet.ReadSvIdl( SvHash_Get(), rInStm ) )
                 [ -  + ]
     511                 :            :     {
     512                 :          0 :         rBase.WriteError( "warning", rtl::OUStringToOString(rInStm.GetFileName(), RTL_TEXTENCODING_UTF8),
     513                 :            :                     "<Get> old style, use Readonly",
     514                 :            :                     rInStm.GetToken()->GetLine(),
     515 [ #  # ][ #  # ]:          0 :                     rInStm.GetToken()->GetColumn() );
         [ #  # ][ #  # ]
                 [ #  # ]
     516                 :            :     }
     517 [ +  - ][ +  - ]:     320510 :     if( aSet.ReadSvIdl( SvHash_Set(), rInStm ) )
                 [ -  + ]
     518                 :            :     {
     519                 :          0 :         rBase.WriteError( "warning", rtl::OUStringToOString(rInStm.GetFileName(), RTL_TEXTENCODING_UTF8),
     520                 :            :                     "<Set> old style, use method declaration",
     521                 :            :                     rInStm.GetToken()->GetLine(),
     522 [ #  # ][ #  # ]:          0 :                     rInStm.GetToken()->GetColumn() );
         [ #  # ][ #  # ]
                 [ #  # ]
     523                 :            :     }
     524                 :            : 
     525 [ +  - ][ +  - ]:     320510 :     if( aCachable.ReadSvIdl( SvHash_Cachable(), rInStm ) )
                 [ +  + ]
     526                 :      32226 :         SetCachable( aCachable ), bOk = sal_True;
     527 [ +  - ][ +  - ]:     320510 :     if( aVolatile.ReadSvIdl( SvHash_Volatile(), rInStm ) )
                 [ -  + ]
     528                 :          0 :         SetVolatile( aVolatile ), bOk = sal_True;
     529 [ +  - ][ +  - ]:     320510 :     if( aToggle.ReadSvIdl( SvHash_Toggle(), rInStm ) )
                 [ +  + ]
     530                 :      16008 :         SetToggle( aToggle ), bOk = sal_True;
     531 [ +  - ][ +  - ]:     320510 :     if( aAutoUpdate.ReadSvIdl( SvHash_AutoUpdate(), rInStm ) )
                 [ +  + ]
     532                 :      16030 :         SetAutoUpdate( aAutoUpdate ), bOk = sal_True;
     533                 :            : 
     534 [ +  - ][ +  - ]:     320510 :     if( aSynchron.ReadSvIdl( SvHash_Synchron(), rInStm ) )
                 [ +  + ]
     535                 :      12836 :         SetSynchron( aSynchron ), bOk = sal_True;
     536 [ +  - ][ +  - ]:     320510 :     if( aAsynchron.ReadSvIdl( SvHash_Asynchron(), rInStm ) )
                 [ +  + ]
     537                 :       3196 :         SetAsynchron( aAsynchron ), bOk = sal_True;
     538                 :            : 
     539 [ +  - ][ +  - ]:     320510 :     if( aRecordAbsolute.ReadSvIdl( SvHash_RecordAbsolute(), rInStm ) )
                 [ +  + ]
     540                 :      15628 :         SetRecordAbsolute( aRecordAbsolute), bOk = sal_True;
     541 [ +  - ][ +  - ]:     320510 :     if( aRecordPerItem.ReadSvIdl( SvHash_RecordPerItem(), rInStm ) )
                 [ +  + ]
     542                 :       1124 :         SetRecordPerItem( aRecordPerItem ), bOk = sal_True;
     543 [ +  - ][ +  - ]:     320510 :     if( aRecordPerSet.ReadSvIdl( SvHash_RecordPerSet(), rInStm ) )
                 [ +  + ]
     544                 :      14010 :         SetRecordPerSet( aRecordPerSet ), bOk = sal_True;
     545 [ +  - ][ +  - ]:     320510 :     if( aRecordManual.ReadSvIdl( SvHash_RecordManual(), rInStm ) )
                 [ +  + ]
     546                 :        362 :         SetRecordManual( aRecordManual ), bOk = sal_True;
     547 [ +  - ][ +  - ]:     320510 :     if( aNoRecord.ReadSvIdl( SvHash_NoRecord(), rInStm ) )
                 [ +  + ]
     548                 :        134 :         SetNoRecord( aNoRecord ), bOk = sal_True;
     549                 :            : 
     550 [ +  - ][ +  - ]:     320510 :     bOk |= aHasDialog.ReadSvIdl( SvHash_HasDialog(), rInStm );
     551 [ +  - ][ +  - ]:     320510 :     bOk |= aPseudoPrefix.ReadSvIdl( SvHash_PseudoPrefix(), rInStm );
     552 [ +  - ][ +  - ]:     320510 :     bOk |= aMenuConfig.ReadSvIdl( SvHash_MenuConfig(), rInStm );
     553 [ +  - ][ +  - ]:     320510 :     bOk |= aToolBoxConfig.ReadSvIdl( SvHash_ToolBoxConfig(), rInStm );
     554 [ +  - ][ +  - ]:     320510 :     bOk |= aStatusBarConfig.ReadSvIdl( SvHash_StatusBarConfig(), rInStm );
     555 [ +  - ][ +  - ]:     320510 :     bOk |= aAccelConfig.ReadSvIdl( SvHash_AccelConfig(), rInStm );
     556                 :            : 
     557                 :     320510 :     SvBOOL aAllConfig;
     558 [ +  - ][ -  + ]:     320510 :     if( aAllConfig.ReadSvIdl( SvHash_AllConfig(), rInStm ) )
                 [ +  - ]
     559                 :          0 :         SetAllConfig( aAllConfig ), bOk = sal_True;
     560 [ +  - ][ +  - ]:     320510 :     bOk |= aFastCall.ReadSvIdl( SvHash_FastCall(), rInStm );
     561 [ +  - ][ +  - ]:     320510 :     bOk |= aContainer.ReadSvIdl( SvHash_Container(), rInStm );
     562 [ +  - ][ +  - ]:     320510 :     bOk |= aImageRotation.ReadSvIdl( SvHash_ImageRotation(), rInStm );
     563 [ +  - ][ +  - ]:     320510 :     bOk |= aImageReflection.ReadSvIdl( SvHash_ImageReflection(), rInStm );
     564 [ +  - ][ +  - ]:     320510 :     bOk |= aUnoName.ReadSvIdl( SvHash_UnoName(), rInStm );
     565                 :            : 
     566         [ +  + ]:     320510 :     if( !bOk )
     567                 :            :     {
     568         [ +  + ]:      48976 :         if( !aSlotType.Is() )
     569                 :            :         {
     570         [ +  - ]:      47318 :             sal_uInt32 nTokPos = rInStm.Tell();
     571         [ +  - ]:      47318 :             SvToken * pTok = rInStm.GetToken_Next();
     572 [ +  - ][ +  + ]:      47318 :             if( pTok->Is( SvHash_SlotType() ) )
     573                 :            :             {
     574         [ +  - ]:       1596 :                 sal_Bool bBraket = rInStm.Read( '(' );
     575 [ +  - ][ +  - ]:       1596 :                 if( bBraket || rInStm.Read( '=' ) )
         [ +  - ][ +  - ]
     576                 :            :                 {
     577 [ +  - ][ +  - ]:       1596 :                     aSlotType = rBase.ReadKnownType( rInStm );
     578         [ +  - ]:       1596 :                     if( aSlotType.Is() )
     579                 :            :                     {
     580         [ +  - ]:       1596 :                         if( aSlotType->IsItem() )
     581                 :            :                         {
     582         [ -  + ]:       1596 :                             if( bBraket )
     583                 :            :                             {
     584 [ #  # ][ #  # ]:          0 :                                 if( rInStm.Read( ')' ) )
     585                 :            :                                     return;
     586                 :            :                             }
     587                 :            :                             else
     588                 :            :                                 return;
     589                 :            :                         }
     590 [ #  # ][ #  # ]:          0 :                         rBase.SetError( "the SlotType is not a item", rInStm.GetToken() );
     591         [ #  # ]:          0 :                         rBase.WriteError( rInStm );
     592                 :            :                     }
     593 [ #  # ][ #  # ]:          0 :                     rBase.SetError( "SlotType with unknown item type", rInStm.GetToken() );
     594         [ #  # ]:          0 :                     rBase.WriteError( rInStm );
     595                 :            :                 }
     596                 :            :             }
     597         [ +  - ]:      45722 :             rInStm.Seek( nTokPos );
     598                 :            : 
     599                 :            :         }
     600         [ +  + ]:      47380 :         if( !aMethod.Is() )
     601                 :            :         {
     602         [ +  - ]:      47228 :             SvToken * pTok = rInStm.GetToken();
     603         [ +  + ]:      47228 :             if( pTok->IsIdentifier() )
     604                 :            :             {
     605 [ +  - ][ +  - ]:         52 :                 aMethod = new SvMetaSlot();
                 [ +  - ]
     606         [ +  - ]:         52 :                 sal_uInt32 nTokPos = rInStm.Tell();
     607 [ +  - ][ +  - ]:         52 :                 if( aMethod->ReadSvIdl( rBase, rInStm ) )
     608                 :            :                 {
     609 [ +  - ][ +  - ]:         52 :                     if( aMethod->IsMethod() )
     610                 :            :                     {
     611         [ +  - ]:         52 :                         aMethod->SetSlotId( GetSlotId() );
     612 [ -  + ][ +  - ]:         52 :                         if( aMethod->Test( rBase, rInStm ) )
     613                 :            :                             return;
     614                 :            :                     }
     615         [ #  # ]:          0 :                     rInStm.Seek( nTokPos );
     616                 :            :                 }
     617         [ #  # ]:     320510 :                 aMethod.Clear();
     618                 :            :             }
     619                 :            :         }
     620                 :            :     }
     621                 :            : }
     622                 :            : 
     623                 :      23654 : void SvMetaSlot::WriteAttributesSvIdl( SvIdlDataBase & rBase,
     624                 :            :                        SvStream & rOutStm,
     625                 :            :                        sal_uInt16 nTab )
     626                 :            : {
     627         [ +  - ]:      23654 :     SvMetaAttribute::WriteAttributesSvIdl( rBase, rOutStm, nTab );
     628                 :            : 
     629         [ +  + ]:      23654 :     if( aSlotType.Is() )
     630                 :            :     {
     631         [ +  - ]:       1596 :         WriteTab( rOutStm, nTab );
     632 [ +  - ][ +  - ]:       1596 :         rOutStm << SvHash_SlotType()->GetName().getStr() << '(';
                 [ +  - ]
     633         [ +  - ]:       1596 :         aSlotType->WriteTheType( rBase, rOutStm, nTab, WRITE_IDL );
     634 [ +  - ][ +  - ]:       1596 :         rOutStm << ");" << endl;
     635                 :            :     }
     636         [ +  + ]:      23654 :     if( aMethod.Is() )
     637                 :            :     {
     638         [ +  - ]:         52 :         WriteTab( rOutStm, nTab );
     639         [ +  - ]:         52 :         aMethod->WriteSvIdl( rBase, rOutStm, nTab );
     640 [ +  - ][ +  - ]:         52 :         rOutStm << ';' << endl;
     641                 :            :     }
     642         [ +  + ]:      23654 :     if( aHasCoreId )
     643                 :            :     {
     644 [ +  - ][ +  - ]:         16 :         aHasCoreId.WriteSvIdl( SvHash_HasCoreId(), rOutStm );
     645 [ +  - ][ +  - ]:         16 :         rOutStm << ';' << endl;
     646                 :            :     }
     647         [ +  + ]:      23654 :     if( !aGroupId.getString().isEmpty() )
     648                 :            :     {
     649         [ +  - ]:      15546 :         WriteTab( rOutStm, nTab );
     650 [ +  - ][ +  - ]:      15546 :         aGroupId.WriteSvIdl( SvHash_GroupId(), rOutStm, nTab +1);
     651 [ +  - ][ +  - ]:      15546 :         rOutStm << ';' << endl;
     652                 :            :     }
     653         [ +  + ]:      23654 :     if( !aExecMethod.getString().isEmpty() )
     654                 :            :     {
     655         [ +  - ]:       7074 :         WriteTab( rOutStm, nTab );
     656 [ +  - ][ +  - ]:       7074 :         aExecMethod.WriteSvIdl( SvHash_ExecMethod(), rOutStm, nTab +1);
     657 [ +  - ][ +  - ]:       7074 :         rOutStm << ';' << endl;
     658                 :            :     }
     659         [ +  + ]:      23654 :     if( !aStateMethod.getString().isEmpty() )
     660                 :            :     {
     661         [ +  - ]:       7106 :         WriteTab( rOutStm, nTab );
     662 [ +  - ][ +  - ]:       7106 :         aStateMethod.WriteSvIdl( SvHash_StateMethod(), rOutStm, nTab +1);
     663 [ +  - ][ +  - ]:       7106 :         rOutStm << ';' << endl;
     664                 :            :     }
     665                 :            : 
     666         [ +  + ]:      23654 :     if( !aDisableFlags.getString().isEmpty() )
     667                 :            :     {
     668         [ +  - ]:       1202 :         WriteTab( rOutStm, nTab );
     669 [ +  - ][ +  - ]:       1202 :         aDisableFlags.WriteSvIdl( SvHash_DisableFlags(), rOutStm, nTab +1);
     670 [ +  - ][ +  - ]:       1202 :         rOutStm << ';' << endl;
     671                 :            :     }
     672                 :            : 
     673 [ +  - ][ +  - ]:      23654 :     if( aSet || aGet || aPseudoSlots )
         [ +  + ][ +  + ]
     674                 :            :     {
     675         [ +  - ]:         98 :         WriteTab( rOutStm, nTab );
     676                 :         98 :         char const * p = "";
     677         [ +  - ]:         98 :         if( aPseudoSlots )
     678                 :            :         {
     679 [ +  - ][ +  - ]:         98 :             aPseudoSlots.WriteSvIdl( SvHash_PseudoSlots(), rOutStm );
     680                 :         98 :             p = ", ";
     681                 :            :         }
     682         [ -  + ]:         98 :         if( aGet )
     683                 :            :         {
     684         [ #  # ]:          0 :             rOutStm << p;
     685 [ #  # ][ #  # ]:          0 :             aGet.WriteSvIdl( SvHash_Get(), rOutStm );
     686                 :          0 :             p = ", ";
     687                 :            :         }
     688         [ -  + ]:         98 :         if( aSet )
     689                 :            :         {
     690         [ #  # ]:          0 :             rOutStm << p;
     691 [ #  # ][ #  # ]:          0 :             aSet.WriteSvIdl( SvHash_Set(), rOutStm );
     692                 :            :         }
     693 [ +  - ][ +  - ]:         98 :         rOutStm << ';' << endl;
     694                 :            :     }
     695                 :            : 
     696                 :      23654 :     rtl::OString aDel(", ");
     697                 :      23654 :     rtl::OStringBuffer aOut;
     698         [ -  + ]:      23654 :     if( aVolatile )
     699 [ #  # ][ #  # ]:          0 :         aOut.append(aVolatile.GetSvIdlString( SvHash_Volatile() ));
                 [ #  # ]
     700         [ -  + ]:      23654 :     else if( !aCachable )
     701                 :            :         // because of Default == TRUE, only when no other is set
     702 [ #  # ][ #  # ]:          0 :         aOut.append(aCachable.GetSvIdlString( SvHash_Cachable() ));
                 [ #  # ]
     703                 :            :     else
     704                 :      23654 :         aDel = rtl::OString();
     705                 :            : 
     706         [ +  + ]:      23654 :     if( aToggle )
     707                 :            :     {
     708 [ +  - ][ +  - ]:       1062 :         aOut.append(aDel).append(aToggle.GetSvIdlString( SvHash_Toggle() ));
         [ +  - ][ +  - ]
     709                 :       1062 :         aDel = ", ";
     710                 :            :     }
     711         [ +  + ]:      23654 :     if( aAutoUpdate )
     712                 :            :     {
     713 [ +  - ][ +  - ]:       5624 :         aOut.append(aDel).append(aAutoUpdate.GetSvIdlString( SvHash_AutoUpdate() ));
         [ +  - ][ +  - ]
     714                 :       5624 :         aDel = ", ";
     715                 :            :     }
     716                 :            : 
     717                 :      23654 :     rtl::OString aDel1(", ");
     718         [ +  + ]:      23654 :     if( aAsynchron )
     719 [ +  - ][ +  - ]:       3196 :         aOut.append(aDel).append(aAsynchron.GetSvIdlString( SvHash_Asynchron() ));
         [ +  - ][ +  - ]
     720         [ -  + ]:      20458 :     else if( !aSynchron )
     721                 :            :     {
     722                 :            :         // because of Default == TRUE, only when no other is set
     723 [ #  # ][ #  # ]:          0 :         aOut.append(aDel).append(aSynchron.GetSvIdlString( SvHash_Synchron() ));
         [ #  # ][ #  # ]
     724                 :            :     }
     725                 :            :     else
     726                 :      20458 :         aDel1 = aDel;
     727                 :            : 
     728                 :      23654 :     aDel = ", ";
     729         [ +  + ]:      23654 :     if( aRecordManual )
     730 [ +  - ][ +  - ]:        362 :         aOut.append(aDel1).append(aRecordManual.GetSvIdlString( SvHash_RecordManual() ));
         [ +  - ][ +  - ]
     731         [ +  + ]:      23292 :     else if( aNoRecord )
     732 [ +  - ][ +  - ]:        134 :         aOut.append(aDel1).append(aNoRecord.GetSvIdlString( SvHash_NoRecord() ));
         [ +  - ][ +  - ]
     733         [ +  + ]:      23158 :     else if( !aRecordPerSet )
     734                 :            :         // because of Default == TRUE, only when no other is set
     735 [ +  - ][ +  - ]:       1124 :         aOut.append(aDel1).append(aRecordPerSet.GetSvIdlString( SvHash_RecordPerSet() ));
         [ +  - ][ +  - ]
     736         [ -  + ]:      22034 :     else if( aRecordPerItem )
     737 [ #  # ][ #  # ]:          0 :         aOut.append(aDel1).append(aRecordPerItem.GetSvIdlString( SvHash_RecordPerItem() ));
         [ #  # ][ #  # ]
     738                 :            :     else
     739                 :      22034 :         aDel = aDel1;
     740                 :            : 
     741         [ +  + ]:      23654 :     if( aRecordAbsolute )
     742                 :            :     {
     743 [ +  - ][ +  - ]:         18 :         aOut.append(aDel).append(aRecordAbsolute.GetSvIdlString( SvHash_RecordAbsolute() ));
         [ +  - ][ +  - ]
     744                 :         18 :         aDel = ", ";
     745                 :            :     }
     746         [ +  + ]:      23654 :     if( aHasDialog )
     747                 :            :     {
     748 [ +  - ][ +  - ]:       2404 :         aOut.append(aDel).append(aHasDialog.GetSvIdlString( SvHash_HasDialog() ));
         [ +  - ][ +  - ]
     749                 :       2404 :         aDel = ", ";
     750                 :            :     }
     751         [ +  + ]:      23654 :     if( aMenuConfig )
     752                 :            :     {
     753 [ +  - ][ +  - ]:       8910 :         aOut.append(aDel).append(aMenuConfig.GetSvIdlString( SvHash_MenuConfig() ));
         [ +  - ][ +  - ]
     754                 :       8910 :         aDel = ", ";
     755                 :            :     }
     756         [ +  + ]:      23654 :     if( aToolBoxConfig )
     757                 :            :     {
     758 [ +  - ][ +  - ]:       9666 :         aOut.append(aDel).append(aToolBoxConfig.GetSvIdlString( SvHash_ToolBoxConfig() ));
         [ +  - ][ +  - ]
     759                 :       9666 :         aDel = ", ";
     760                 :            :     }
     761         [ +  + ]:      23654 :     if( aStatusBarConfig )
     762                 :            :     {
     763 [ +  - ][ +  - ]:        220 :         aOut.append(aDel).append(aStatusBarConfig.GetSvIdlString( SvHash_StatusBarConfig() ));
         [ +  - ][ +  - ]
     764                 :        220 :         aDel = ", ";
     765                 :            :     }
     766         [ +  + ]:      23654 :     if( aAccelConfig )
     767                 :            :     {
     768 [ +  - ][ +  - ]:       9256 :         aOut.append(aDel).append(aAccelConfig.GetSvIdlString( SvHash_AccelConfig() ));
         [ +  - ][ +  - ]
     769                 :       9256 :         aDel = ", ";
     770                 :            :     }
     771         [ +  + ]:      23654 :     if( aFastCall )
     772                 :            :     {
     773 [ +  - ][ +  - ]:       2240 :         aOut.append(aDel).append(aFastCall.GetSvIdlString( SvHash_FastCall() ));
         [ +  - ][ +  - ]
     774                 :       2240 :         aDel = ", ";
     775                 :            :     }
     776         [ +  + ]:      23654 :     if( aContainer )
     777                 :            :     {
     778 [ +  - ][ +  - ]:       2258 :         aOut.append(aDel).append(aContainer.GetSvIdlString( SvHash_Container() ));
         [ +  - ][ +  - ]
     779                 :       2258 :         aDel = ", ";
     780                 :            :     }
     781         [ +  + ]:      23654 :     if( aImageRotation )
     782                 :            :     {
     783 [ +  - ][ +  - ]:        232 :         aOut.append(aDel).append(aImageRotation.GetSvIdlString( SvHash_ImageRotation() ));
         [ +  - ][ +  - ]
     784                 :        232 :         aDel = ", ";
     785                 :            :     }
     786                 :            : 
     787         [ +  + ]:      23654 :     if( aImageReflection )
     788                 :            :     {
     789 [ +  - ][ +  - ]:        162 :         aOut.append(aDel).append(aImageReflection.GetSvIdlString( SvHash_ImageReflection() ));
         [ +  - ][ +  - ]
     790                 :        162 :         aDel = ", ";
     791                 :            :     }
     792                 :            : 
     793         [ +  + ]:      23654 :     if( aOut.getLength() )
     794                 :            :     {
     795         [ +  - ]:      13764 :         WriteTab( rOutStm, nTab );
     796 [ +  - ][ +  - ]:      13764 :         rOutStm << aOut.getStr() << endl;
     797                 :      23654 :     }
     798                 :      23654 : }
     799                 :            : 
     800                 :            : 
     801                 :      23654 : sal_Bool SvMetaSlot::Test( SvIdlDataBase & rBase, SvTokenStream & rInStm )
     802                 :            : {
     803                 :      23654 :     sal_Bool bOk = SvMetaAttribute::Test( rBase, rInStm );
     804         [ +  - ]:      23654 :     if( bOk )
     805                 :            :     {
     806                 :      23654 :         SvMetaType * pType = GetType();
     807         [ +  + ]:      23654 :         if( pType->GetType() == TYPE_METHOD )
     808                 :      13248 :             pType = pType->GetReturnType();
     809         [ -  + ]:      23654 :         if( !pType->IsItem() )
     810                 :            :         {
     811         [ #  # ]:          0 :             rBase.SetError( "this attribute is not a slot", rInStm.GetToken() );
     812                 :          0 :             rBase.WriteError( rInStm );
     813                 :          0 :             bOk = sal_False;
     814                 :            :         }
     815                 :            :     }
     816                 :            : 
     817                 :      23654 :     return bOk;
     818                 :            : }
     819                 :            : 
     820                 :      24322 : sal_Bool SvMetaSlot::ReadSvIdl( SvIdlDataBase & rBase, SvTokenStream & rInStm )
     821                 :            : {
     822                 :      24322 :     sal_uInt32  nTokPos     = rInStm.Tell();
     823                 :      24322 :     sal_Bool bOk = sal_True;
     824                 :            : 
     825                 :      24322 :     SvMetaAttribute * pAttr = rBase.ReadKnownAttr( rInStm, GetType() );
     826         [ +  + ]:      24322 :     if( pAttr )
     827                 :            :     {
     828                 :            :         // c
     829 [ +  - ][ +  - ]:       7544 :         SvMetaSlot * pKnownSlot = PTR_CAST( SvMetaSlot, pAttr );
     830         [ +  - ]:       7544 :         if( pKnownSlot )
     831                 :            :         {
     832                 :       7544 :             SetRef( pKnownSlot );
     833                 :       7544 :             SetName( pKnownSlot->GetName().getString(), &rBase );
     834                 :       7544 :             bOk = SvMetaName::ReadSvIdl( rBase, rInStm );
     835                 :            :         }
     836                 :            :         else
     837                 :            :         {
     838                 :          0 :             rtl::OStringBuffer aStr( "attribute " );
     839 [ #  # ][ #  # ]:          0 :             aStr.append(pAttr->GetName().getString());
     840         [ #  # ]:          0 :             aStr.append(" is method or variable but not a slot");
     841 [ #  # ][ #  # ]:          0 :             rBase.SetError( aStr.makeStringAndClear(), rInStm.GetToken() );
     842         [ #  # ]:          0 :             rBase.WriteError( rInStm );
     843                 :          0 :             bOk = sal_False;
     844                 :            :         }
     845                 :            :     }
     846                 :            :     else
     847                 :            :     {
     848                 :      16778 :         bOk = SvMetaAttribute::ReadSvIdl( rBase, rInStm );
     849                 :            : 
     850                 :      16778 :         SvMetaAttribute *pAttr2 = rBase.SearchKnownAttr( GetSlotId() );
     851         [ +  + ]:      16778 :         if( pAttr2 )
     852                 :            :         {
     853                 :            :             // for testing purposes: reference in case of complete definition
     854 [ +  - ][ +  - ]:         82 :             SvMetaSlot * pKnownSlot = PTR_CAST( SvMetaSlot, pAttr2 );
     855         [ +  - ]:         82 :             if( pKnownSlot )
     856                 :            :             {
     857                 :         82 :                 SetRef( pKnownSlot );
     858                 :            : 
     859                 :            :                   // names may differ, because explicitly given
     860         [ -  + ]:         82 :                 if ( pKnownSlot->GetName().getString() != GetName().getString() )
     861                 :            :                 {
     862                 :            :                     OSL_FAIL("Illegal definition!");
     863                 :          0 :                     rInStm.Seek( nTokPos );
     864                 :          0 :                     return sal_False;
     865                 :            :                 }
     866                 :            : 
     867                 :         82 :                   SetName( pKnownSlot->GetName().getString(), &rBase );
     868                 :            :             }
     869                 :            :             else
     870                 :            :             {
     871                 :          0 :                 rtl::OStringBuffer aStr("attribute ");
     872 [ #  # ][ #  # ]:          0 :                 aStr.append(pAttr2->GetName().getString());
     873         [ #  # ]:          0 :                 aStr.append(" is method or variable but not a slot");
     874 [ #  # ][ #  # ]:          0 :                 rBase.SetError( aStr.makeStringAndClear(), rInStm.GetToken() );
     875         [ #  # ]:          0 :                 rBase.WriteError( rInStm );
     876                 :          0 :                 bOk = sal_False;
     877                 :            :             }
     878                 :            :         }
     879                 :            :     }
     880                 :            : 
     881         [ +  + ]:      24322 :     if( !bOk )
     882                 :        668 :         rInStm.Seek( nTokPos );
     883                 :            : 
     884                 :      24322 :     return bOk;
     885                 :            : }
     886                 :            : 
     887                 :      23654 : void SvMetaSlot::WriteSvIdl( SvIdlDataBase & rBase, SvStream & rOutStm,
     888                 :            :                             sal_uInt16 nTab )
     889                 :            : {
     890                 :      23654 :     SvMetaAttribute::WriteSvIdl( rBase, rOutStm, nTab );
     891                 :      23654 : }
     892                 :            : 
     893                 :          0 : void SvMetaSlot::Write( SvIdlDataBase & rBase,
     894                 :            :                         SvStream & rOutStm, sal_uInt16 nTab,
     895                 :            :                         WriteType nT, WriteAttribute nA )
     896                 :            : {
     897         [ #  # ]:          0 :     if ( nT == WRITE_DOCU )
     898                 :            :     {
     899         [ #  # ]:          0 :         if ( GetHidden() )
     900                 :          0 :             return;
     901                 :            :     }
     902                 :            :     else
     903                 :            :     {
     904                 :            :         // no attribute for Automation
     905 [ #  # ][ #  # ]:          0 :         if( !GetAutomation() || !GetExport() )
                 [ #  # ]
     906                 :          0 :             return;
     907                 :            :     }
     908                 :            : 
     909         [ #  # ]:          0 :     if( !(nA & WA_VARIABLE) )
     910                 :            :     {
     911         [ #  # ]:          0 :         SvMetaAttributeRef xM = GetMethod();
     912         [ #  # ]:          0 :         if( xM.Is() )
     913                 :            :         {
     914         [ #  # ]:          0 :             xM->SetSlotId( GetSlotId() );
     915         [ #  # ]:          0 :             xM->SetDescription( GetDescription().getString() );
     916         [ #  # ]:          0 :             xM->Write( rBase, rOutStm, nTab, nT, nA );
     917                 :            :             return;
     918 [ #  # ][ #  # ]:          0 :         }
     919                 :            :     }
     920                 :            : 
     921                 :          0 :     SvMetaAttribute::Write( rBase, rOutStm, nTab, nT, nA );
     922                 :            : }
     923                 :            : 
     924                 :            : 
     925                 :      10954 : void SvMetaSlot::Insert( SvSlotElementList& rList, const rtl::OString& rPrefix,
     926                 :            :                         SvIdlDataBase& rBase)
     927                 :            : {
     928                 :            :     // get insert position through binary search in slotlist
     929                 :      10954 :     sal_uInt16 nId = (sal_uInt16) GetSlotId().GetValue();
     930                 :      10954 :     sal_uInt16 nListCount = (sal_uInt16) rList.size();
     931                 :            :     sal_uInt16 nPos;
     932                 :            :     sal_uLong m;  // for inner "for" loop
     933                 :            : 
     934         [ +  + ]:      10954 :     if ( !nListCount )
     935                 :        154 :         nPos = 0;
     936         [ +  + ]:      10800 :     else if ( nListCount == 1 )
     937                 :        142 :         nPos = rList[ 0 ]->xSlot->GetSlotId().GetValue() >= nId ? 0 : 1;
     938                 :            :     else
     939                 :            :     {
     940                 :      10658 :         sal_uInt16 nMid = 0, nLow = 0;
     941                 :      10658 :         sal_uInt16 nHigh = nListCount - 1;
     942                 :      10658 :         sal_Bool bFound = sal_False;
     943 [ +  - ][ +  + ]:      75972 :         while ( !bFound && nLow <= nHigh )
                 [ +  + ]
     944                 :            :         {
     945                 :      65662 :             nMid = (nLow + nHigh) >> 1;
     946                 :            :             DBG_ASSERT( nMid < nListCount, "bsearch ist buggy" );
     947                 :      65662 :             int nDiff = (int) nId - (int) rList[ nMid ]->xSlot->GetSlotId().GetValue();
     948         [ +  + ]:      65662 :             if ( nDiff < 0)
     949                 :            :             {
     950         [ +  + ]:      29290 :                 if ( nMid == 0 )
     951                 :        348 :                     break;
     952                 :      28942 :                 nHigh = nMid - 1;
     953                 :            :             }
     954         [ +  - ]:      36372 :             else if ( nDiff > 0 )
     955                 :            :             {
     956                 :      36372 :                 nLow = nMid + 1;
     957         [ -  + ]:      36372 :                 if ( nLow == 0 )
     958                 :          0 :                 break;
     959                 :            :             }
     960                 :            :             else
     961                 :          0 :                 bFound = sal_True;
     962                 :            :         }
     963                 :            : 
     964                 :            :         DBG_ASSERT(!bFound, "Duplicate SlotId!");
     965         [ -  + ]:      10658 :         nPos = bFound ? nMid : nLow;
     966                 :            :     }
     967                 :            : 
     968                 :            :     DBG_ASSERT( nPos <= nListCount,
     969                 :            :         "nPos too large" );
     970                 :            :     DBG_ASSERT( nPos == nListCount || nId <=
     971                 :            :         (sal_uInt16) rList[ nPos ]->xSlot->GetSlotId().GetValue(),
     972                 :            :         "Successor has lower SlotId" );
     973                 :            :     DBG_ASSERT( nPos == 0 || nId >
     974                 :            :         (sal_uInt16) rList[ nPos-1 ]->xSlot->GetSlotId().GetValue(),
     975                 :            :         "Predecessor has higher SlotId" );
     976                 :            :     DBG_ASSERT( nPos+1 >= nListCount || nId <
     977                 :            :         (sal_uInt16) rList[ nPos+1 ]->xSlot->GetSlotId().GetValue(),
     978                 :            :         "Successor has lower SlotId" );
     979                 :            : 
     980         [ +  + ]:      10954 :     if ( nPos < rList.size() )
     981                 :            :     {
     982                 :      10060 :         SvSlotElementList::iterator it = rList.begin();
     983         [ +  - ]:      10060 :         std::advance( it, nPos );
     984 [ +  - ][ +  - ]:      10060 :         rList.insert( it, new SvSlotElement( this, rPrefix ) );
                 [ +  - ]
     985                 :            :     }
     986                 :            :     else
     987                 :            :     {
     988 [ +  - ][ +  - ]:        894 :         rList.push_back( new SvSlotElement( this, rPrefix ) );
     989                 :            :     }
     990                 :            : 
     991                 :            :     // iron out EnumSlots
     992                 :      10954 :     SvMetaTypeEnum * pEnum = NULL;
     993                 :      10954 :     SvMetaType * pBType = GetType()->GetBaseType();
     994 [ +  + ][ +  - ]:      10954 :     pEnum = PTR_CAST( SvMetaTypeEnum, pBType );
     995 [ +  + ][ +  + ]:      10954 :     if( GetPseudoSlots() && pEnum && pEnum->Count() )
         [ +  - ][ +  + ]
     996                 :            :     {
     997                 :            :         // clone the MasterSlot
     998                 :         10 :         SvMetaSlotRef xEnumSlot;
     999                 :         10 :         SvMetaSlot *pFirstEnumSlot = NULL;
    1000 [ +  - ][ +  + ]:        146 :         for( sal_uLong n = 0; n < pEnum->Count(); n++ )
    1001                 :            :         {
    1002                 :            :             // create SlotId
    1003         [ +  - ]:        136 :             SvMetaEnumValue *enumValue = pEnum->GetObject(n);
    1004         [ +  - ]:        136 :             rtl::OString aValName = enumValue->GetName().getString();
    1005                 :        136 :             rtl::OStringBuffer aBuf;
    1006 [ +  - ][ +  - ]:        136 :             if( !GetPseudoPrefix().isEmpty() )
    1007 [ +  - ][ +  - ]:        136 :                 aBuf.append(GetPseudoPrefix());
    1008                 :            :             else
    1009 [ #  # ][ #  # ]:          0 :                 aBuf.append(GetSlotId().getString());
    1010         [ +  - ]:        136 :             aBuf.append('_');
    1011         [ +  - ]:        136 :             aBuf.append(aValName.copy(pEnum->GetPrefix().getLength()));
    1012                 :            : 
    1013                 :        136 :             rtl::OString aSId = aBuf.makeStringAndClear();
    1014                 :            : 
    1015         [ +  - ]:        136 :             xEnumSlot = NULL;
    1016 [ +  - ][ +  - ]:      71830 :             for( m=0; m<rBase.GetAttrList().size(); m++ )
    1017                 :            :             {
    1018                 :      71830 :                 SvMetaAttribute * pAttr = rBase.GetAttrList()[m];
    1019 [ +  + ][ +  - ]:      71830 :                 if (aSId.equals(pAttr->GetSlotId().getString()))
    1020                 :            :                 {
    1021 [ +  - ][ +  - ]:        136 :                     SvMetaSlot* pSlot = PTR_CAST( SvMetaSlot, pAttr );
                 [ +  - ]
    1022 [ +  - ][ +  - ]:        136 :                     xEnumSlot = pSlot->Clone();
    1023                 :        136 :                     break;
    1024                 :            :                 }
    1025                 :            :             }
    1026                 :            : 
    1027 [ +  - ][ -  + ]:        136 :             if ( m == rBase.GetAttrList().size() )
    1028                 :            :             {
    1029                 :            :                 OSL_FAIL("Invalid EnumSlot!");
    1030 [ #  # ][ #  # ]:          0 :                 xEnumSlot = Clone();
    1031                 :            :                 sal_uLong nValue;
    1032 [ #  # ][ #  # ]:          0 :                 if ( rBase.FindId(aSId , &nValue) )
    1033                 :            :                 {
    1034                 :          0 :                     SvNumberIdentifier aId;
    1035                 :          0 :                     aId.setString(aSId);
    1036                 :          0 :                     aId.SetValue(nValue);
    1037                 :          0 :                     xEnumSlot->SetSlotId(aId);
    1038                 :            :                 }
    1039                 :            :             }
    1040                 :            : 
    1041                 :            :             // The slaves are no master!
    1042                 :        136 :             xEnumSlot->aPseudoSlots = sal_False;
    1043                 :        136 :             xEnumSlot->SetEnumValue(enumValue);
    1044                 :            : 
    1045 [ +  - ][ +  - ]:        136 :             if ( !pFirstEnumSlot || xEnumSlot->GetSlotId().GetValue() < pFirstEnumSlot->GetSlotId().GetValue() )
         [ +  + ][ +  + ]
                 [ +  + ]
    1046                 :         14 :                 pFirstEnumSlot = xEnumSlot;
    1047                 :            : 
    1048                 :            :             // insert the created slave as well
    1049         [ +  - ]:        136 :             xEnumSlot->Insert( rList, rPrefix, rBase);
    1050                 :            : 
    1051                 :            :             // concatenate the EnumSlots with the master
    1052                 :        136 :             xEnumSlot->pLinkedSlot = this;
    1053                 :        136 :         }
    1054                 :            : 
    1055                 :            :         // master points to the first slave
    1056                 :         10 :         pLinkedSlot = pFirstEnumSlot;
    1057                 :            : 
    1058                 :            :         // concatenate slaves among themselves
    1059         [ +  - ]:         10 :         xEnumSlot = pFirstEnumSlot;
    1060                 :         10 :         size_t i = 0;
    1061                 :            :         SvSlotElement *pEle;
    1062         [ +  + ]:        410 :         do
    1063                 :            :         {
    1064         [ +  + ]:        410 :             pEle = ( ++i < rList.size() ) ? rList[ i ] : NULL;
    1065 [ +  + ][ +  + ]:        410 :             if ( pEle && pEle->xSlot->pLinkedSlot == this )
                 [ +  + ]
    1066                 :            :             {
    1067                 :        134 :                 xEnumSlot->pNextSlot = pEle->xSlot;
    1068         [ +  - ]:        134 :                 xEnumSlot = pEle->xSlot;
    1069                 :            :             }
    1070                 :            :         }
    1071                 :            :         while ( pEle );
    1072         [ +  - ]:         10 :         xEnumSlot->pNextSlot = pFirstEnumSlot;
    1073                 :            :     }
    1074                 :      10954 : }
    1075                 :            : 
    1076                 :            : 
    1077                 :      66290 : static rtl::OString MakeSlotName( SvStringHashEntry * pEntry )
    1078                 :            : {
    1079         [ +  - ]:      66290 :     rtl::OStringBuffer aName(RTL_CONSTASCII_STRINGPARAM("SFX_SLOT_"));
    1080         [ +  - ]:      66290 :     aName.append(pEntry->GetName());
    1081                 :      66290 :     return aName.makeStringAndClear().toAsciiUpperCase();
    1082                 :            : };
    1083                 :            : 
    1084                 :      10954 : void SvMetaSlot::WriteSlotStubs( const rtl::OString& rShellName,
    1085                 :            :                                 ByteStringList & rList,
    1086                 :            :                                 SvStream & rOutStm )
    1087                 :            : {
    1088 [ +  - ][ +  + ]:      10954 :     if ( !GetExport() && !GetHidden() )
         [ +  - ][ -  + ]
                 [ +  - ]
    1089                 :      10954 :         return;
    1090                 :            : 
    1091         [ +  - ]:      10954 :     rtl::OString aMethodName( GetExecMethod() );
    1092         [ +  + ]:      21164 :     if ( !aMethodName.isEmpty() &&
           [ +  +  +  + ]
    1093                 :      10210 :          !aMethodName.equalsL(RTL_CONSTASCII_STRINGPARAM("NoExec")) )
    1094                 :            :     {
    1095                 :      10196 :         sal_Bool bIn = sal_False;
    1096         [ +  + ]:      60062 :         for( size_t n = 0; n < rList.size(); n++ )
    1097                 :            :         {
    1098         [ +  + ]:      59410 :             if (rList[n]->equals(aMethodName))
    1099                 :            :             {
    1100                 :       9544 :                 bIn=sal_True;
    1101                 :       9544 :                 break;
    1102                 :            :             }
    1103                 :            :         }
    1104                 :            : 
    1105         [ +  + ]:      10196 :         if ( !bIn )
    1106                 :            :         {
    1107 [ +  - ][ +  - ]:        652 :             rList.push_back( new rtl::OString(aMethodName) );
    1108         [ +  - ]:        652 :             rOutStm << "SFX_EXEC_STUB("
    1109         [ +  - ]:       1304 :                     << rShellName.getStr()
    1110         [ +  - ]:        652 :                     << ','
    1111         [ +  - ]:       1304 :                     << aMethodName.getStr()
    1112 [ +  - ][ +  - ]:        652 :                     << ')' << endl;
    1113                 :            :         }
    1114                 :            :     }
    1115                 :            : 
    1116         [ +  - ]:      10954 :     aMethodName = GetStateMethod();
    1117         [ +  + ]:      21116 :     if (!aMethodName.isEmpty() &&
           [ +  +  +  + ]
    1118                 :      10162 :         !aMethodName.equalsL(RTL_CONSTASCII_STRINGPARAM("NoState")))
    1119                 :            :     {
    1120                 :       9496 :         sal_Bool bIn = sal_False;
    1121         [ +  + ]:      51460 :         for ( size_t n=0; n < rList.size(); n++ )
    1122                 :            :         {
    1123         [ +  + ]:      50906 :             if (rList[n]->equals(aMethodName))
    1124                 :            :             {
    1125                 :       8942 :                 bIn=sal_True;
    1126                 :       8942 :                 break;
    1127                 :            :             }
    1128                 :            :         }
    1129                 :            : 
    1130         [ +  + ]:       9496 :         if ( !bIn )
    1131                 :            :         {
    1132 [ +  - ][ +  - ]:        554 :             rList.push_back( new rtl::OString(aMethodName) );
    1133         [ +  - ]:        554 :             rOutStm << "SFX_STATE_STUB("
    1134         [ +  - ]:       1108 :                     << rShellName.getStr()
    1135         [ +  - ]:        554 :                     << ','
    1136         [ +  - ]:       1108 :                     << aMethodName.getStr()
    1137 [ +  - ][ +  - ]:        554 :                     << ')' << endl;
    1138                 :            :         }
    1139                 :      10954 :     }
    1140                 :            : }
    1141                 :            : 
    1142                 :      10954 : void SvMetaSlot::WriteSlot( const rtl::OString& rShellName, sal_uInt16 nCount,
    1143                 :            :                             const rtl::OString& rSlotId,
    1144                 :            :                             SvSlotElementList& rSlotList,
    1145                 :            :                             size_t nStart,
    1146                 :            :                             const rtl::OString& rPrefix,
    1147                 :            :                             SvIdlDataBase & rBase, SvStream & rOutStm )
    1148                 :            : {
    1149 [ +  - ][ +  + ]:      10954 :     if ( !GetExport() && !GetHidden() )
         [ +  - ][ -  + ]
                 [ +  - ]
    1150                 :      10954 :         return;
    1151                 :            : 
    1152                 :      10954 :     sal_Bool bIsEnumSlot = 0 != pEnumValue;
    1153                 :            : 
    1154         [ +  - ]:      10954 :     rOutStm << "// Slot Nr. "
    1155         [ +  - ]:      32862 :         << rtl::OString::valueOf(static_cast<sal_Int32>(nListPos)).getStr()
    1156         [ +  - ]:      10954 :         << " : ";
    1157                 :            :     rtl::OString aSlotIdValue(rtl::OString::valueOf(static_cast<sal_Int32>(
    1158         [ +  - ]:      10954 :         GetSlotId().GetValue())));
    1159 [ +  - ][ +  - ]:      10954 :     rOutStm << aSlotIdValue.getStr() << endl;
    1160         [ +  - ]:      10954 :     WriteTab( rOutStm, 1 );
    1161         [ +  + ]:      10954 :     if( bIsEnumSlot )
    1162         [ +  - ]:        136 :         rOutStm << "SFX_NEW_SLOT_ENUM( ";
    1163                 :            :     else
    1164 [ +  - ][ +  - ]:      10818 :         rOutStm << "SFX_NEW_SLOT_ARG( " << rShellName.getStr() << ',' ;
                 [ +  - ]
    1165                 :            : 
    1166 [ +  - ][ +  - ]:      10954 :     rOutStm << rSlotId.getStr() << ',';
    1167                 :      10954 :     const SvHelpContext& rHlpCtx = GetHelpContext();
    1168         [ -  + ]:      10954 :     if( rHlpCtx.IsSet() )
    1169 [ #  # ][ #  # ]:          0 :         rOutStm << rHlpCtx.getString().getStr() << ',';
    1170                 :            :     else
    1171 [ +  - ][ +  - ]:      10954 :         rOutStm << rSlotId.getStr() << ',';
    1172                 :            : 
    1173                 :            :     // GroupId
    1174 [ +  - ][ +  + ]:      10954 :     if( !GetGroupId().isEmpty() )
    1175 [ +  - ][ +  - ]:      10792 :         rOutStm << GetGroupId().getStr();
    1176                 :            :     else
    1177         [ +  - ]:        162 :         rOutStm << '0';
    1178 [ +  - ][ +  - ]:      10954 :     rOutStm << ',' << endl;
    1179         [ +  - ]:      10954 :     WriteTab( rOutStm, 4 );
    1180                 :            : 
    1181         [ +  + ]:      10954 :     if( bIsEnumSlot )
    1182                 :            :     {
    1183 [ +  - ][ +  - ]:        136 :         rOutStm << "&a" << rShellName.getStr() << "Slots_Impl["
                 [ +  - ]
    1184         [ +  - ]:        408 :             << rtl::OString::valueOf(static_cast<sal_Int32>(pLinkedSlot->GetListPos())).getStr()
    1185 [ +  - ][ +  - ]:        136 :             << "] /*Offset Master*/, " << endl;
    1186         [ +  - ]:        136 :         WriteTab( rOutStm, 4 );
    1187 [ +  - ][ +  - ]:        136 :         rOutStm << "&a" << rShellName.getStr() << "Slots_Impl["
                 [ +  - ]
    1188         [ +  - ]:        408 :             << rtl::OString::valueOf(static_cast<sal_Int32>(pNextSlot->GetListPos())).getStr()
    1189 [ +  - ][ +  - ]:        136 :             << "] /*Offset Next*/, " << endl;
    1190                 :            : 
    1191         [ +  - ]:        136 :         WriteTab( rOutStm, 4 );
    1192                 :            : 
    1193                 :            :         // SlotId
    1194 [ +  - ][ +  - ]:        136 :         if( !GetSlotId().getString().isEmpty() )
    1195 [ +  - ][ +  - ]:        136 :             rOutStm << pLinkedSlot->GetSlotId().getString().getStr();
    1196                 :            :         else
    1197         [ #  # ]:          0 :             rOutStm << '0';
    1198         [ +  - ]:        136 :         rOutStm << ',';
    1199 [ +  - ][ +  - ]:        136 :         rOutStm << pEnumValue->GetName().getString().getStr();
    1200                 :            :     }
    1201                 :            :     else
    1202                 :            :     {
    1203                 :            :         // look for the next slot with the same StateMethod like me
    1204                 :            :         // the slotlist is set to the current slot
    1205                 :      10818 :         size_t i = nStart;
    1206         [ +  + ]:      10818 :         SvSlotElement* pEle = ( ++i < rSlotList.size() ) ? rSlotList[ i ] : NULL;
    1207         [ +  + ]:      10818 :         pNextSlot = pEle ? &pEle->xSlot : NULL;
    1208         [ +  + ]:      85232 :         while ( pNextSlot )
    1209                 :            :         {
    1210   [ +  +  +  + ]:     168482 :             if ( !pNextSlot->pNextSlot &&
                 [ +  + ]
    1211 [ +  - ][ +  - ]:      83932 :                 pNextSlot->GetStateMethod() == GetStateMethod()
    1212                 :            :             ) {
    1213                 :      10136 :                 break;
    1214                 :            :             }
    1215         [ +  + ]:      74414 :             pEle = ( ++i < rSlotList.size() ) ? rSlotList[ i ] : NULL;
    1216         [ +  + ]:      74414 :             pNextSlot = pEle ? &pEle->xSlot : NULL;
    1217                 :            :         }
    1218                 :            : 
    1219         [ +  + ]:      10818 :         if ( !pNextSlot )
    1220                 :            :         {
    1221                 :            :             // There is no slot behind me that has the same ExecMethod.
    1222                 :            :             // So I search for the first slot with it (could be myself).
    1223                 :        682 :             i = 0;
    1224         [ -  + ]:        682 :             pEle = rSlotList.empty() ? NULL : rSlotList[ i ];
    1225         [ +  - ]:        682 :             pNextSlot = pEle ? &pEle->xSlot : NULL;
    1226         [ +  + ]:      32412 :             while ( pNextSlot != this )
    1227                 :            :             {
    1228   [ +  +  +  + ]:      63206 :                 if ( !pNextSlot->pEnumValue &&
                 [ +  + ]
    1229 [ +  - ][ +  - ]:      31476 :                     pNextSlot->GetStateMethod() == GetStateMethod() )
    1230                 :        568 :                     break;
    1231         [ +  - ]:      31162 :                 pEle = ( ++i < rSlotList.size() ) ? rSlotList[ i ] : NULL;
    1232         [ +  - ]:      31162 :                 pNextSlot = pEle ? &pEle->xSlot : NULL;
    1233                 :            :             }
    1234                 :            :         }
    1235                 :            : 
    1236         [ +  + ]:      10818 :         if ( !pLinkedSlot )
    1237                 :            :         {
    1238         [ +  - ]:      10808 :             rOutStm << "0 ,";
    1239                 :            :         }
    1240                 :            :         else
    1241                 :            :         {
    1242 [ +  - ][ +  - ]:         10 :             rOutStm << "&a" << rShellName.getStr() << "Slots_Impl["
                 [ +  - ]
    1243         [ +  - ]:         30 :                 << rtl::OString::valueOf(static_cast<sal_Int32>(pLinkedSlot->GetListPos())).getStr()
    1244 [ +  - ][ +  - ]:         10 :                 << "] /*Offset Linked*/, " << endl;
    1245         [ +  - ]:         10 :             WriteTab( rOutStm, 4 );
    1246                 :            :         }
    1247                 :            : 
    1248 [ +  - ][ +  - ]:      10818 :         rOutStm << "&a" << rShellName.getStr() << "Slots_Impl["
                 [ +  - ]
    1249         [ +  - ]:      32454 :             << rtl::OString::valueOf(static_cast<sal_Int32>(pNextSlot->GetListPos())).getStr()
    1250 [ +  - ][ +  - ]:      10818 :             << "] /*Offset Next*/, " << endl;
    1251                 :            : 
    1252         [ +  - ]:      10818 :         WriteTab( rOutStm, 4 );
    1253                 :            : 
    1254                 :            :         // write ExecMethod, with standard name if not specified
    1255         [ +  - ]:      21028 :         if( !GetExecMethod().isEmpty() &&
           [ +  +  +  + ]
                 [ +  + ]
    1256         [ +  - ]:      10210 :             !GetExecMethod().equalsL(RTL_CONSTASCII_STRINGPARAM("NoExec")))
    1257                 :            :         {
    1258 [ +  - ][ +  - ]:      10196 :             rOutStm << "SFX_STUB_PTR(" << rShellName.getStr() << ','
                 [ +  - ]
    1259 [ +  - ][ +  - ]:      20392 :                     << GetExecMethod().getStr() << ')';
                 [ +  - ]
    1260                 :            :         }
    1261                 :            :         else
    1262         [ +  - ]:        622 :             rOutStm << "SFX_STUB_PTR_EXEC_NONE";
    1263         [ +  - ]:      10818 :         rOutStm << ',';
    1264                 :            : 
    1265                 :            :         // write StateMethod, with standard name if not specified
    1266         [ +  - ]:      20980 :         if( !GetStateMethod().isEmpty() &&
           [ +  +  +  + ]
                 [ +  + ]
    1267         [ +  - ]:      10162 :             !GetStateMethod().equalsL(RTL_CONSTASCII_STRINGPARAM("NoState")))
    1268                 :            :         {
    1269 [ +  - ][ +  - ]:       9496 :             rOutStm << "SFX_STUB_PTR(" << rShellName.getStr() << ','
                 [ +  - ]
    1270 [ +  - ][ +  - ]:      18992 :                     << GetStateMethod().getStr() << ')';
                 [ +  - ]
    1271                 :            :         }
    1272                 :            :         else
    1273         [ +  - ]:       1322 :             rOutStm << "SFX_STUB_PTR_STATE_NONE";
    1274                 :            :     }
    1275 [ +  - ][ +  - ]:      10954 :     rOutStm << ',' << endl;
    1276         [ +  - ]:      10954 :     WriteTab( rOutStm, 4 );
    1277                 :            : 
    1278                 :            :     // write flags
    1279 [ +  - ][ -  + ]:      10954 :     if( GetHasCoreId() )
    1280 [ #  # ][ #  # ]:          0 :         rOutStm << MakeSlotName( SvHash_HasCoreId() ).getStr() << '|';
         [ #  # ][ #  # ]
    1281 [ +  - ][ +  - ]:      10954 :     if( GetCachable() )
    1282 [ +  - ][ +  - ]:      10954 :         rOutStm << MakeSlotName( SvHash_Cachable() ).getStr() << '|';
         [ +  - ][ +  - ]
    1283 [ +  - ][ -  + ]:      10954 :     if( GetVolatile() )
    1284 [ #  # ][ #  # ]:          0 :         rOutStm << MakeSlotName( SvHash_Volatile() ).getStr() << '|';
         [ #  # ][ #  # ]
    1285 [ +  - ][ +  + ]:      10954 :     if( GetToggle() )
    1286 [ +  - ][ +  - ]:        550 :         rOutStm << MakeSlotName( SvHash_Toggle() ).getStr() << '|';
         [ +  - ][ +  - ]
    1287 [ +  - ][ +  + ]:      10954 :     if( GetAutoUpdate() )
    1288 [ +  - ][ +  - ]:       3006 :         rOutStm << MakeSlotName( SvHash_AutoUpdate() ).getStr() << '|';
         [ +  - ][ +  - ]
    1289 [ +  - ][ +  + ]:      10954 :     if( GetSynchron() )
    1290 [ +  - ][ +  - ]:       9062 :         rOutStm << MakeSlotName( SvHash_Synchron() ).getStr() << '|';
         [ +  - ][ +  - ]
    1291 [ +  - ][ +  + ]:      10954 :     if( GetAsynchron() )
    1292 [ +  - ][ +  - ]:       1892 :         rOutStm << MakeSlotName( SvHash_Asynchron() ).getStr() << '|';
         [ +  - ][ +  - ]
    1293 [ +  - ][ +  + ]:      10954 :     if( GetRecordPerItem() )
    1294 [ +  - ][ +  - ]:        656 :         rOutStm << MakeSlotName( SvHash_RecordPerItem() ).getStr() << '|';
         [ +  - ][ +  - ]
    1295 [ +  - ][ +  + ]:      10954 :     if( GetRecordPerSet() )
    1296 [ +  - ][ +  - ]:       9996 :         rOutStm << MakeSlotName( SvHash_RecordPerSet() ).getStr() << '|';
         [ +  - ][ +  - ]
    1297 [ +  - ][ +  + ]:      10954 :     if( GetRecordManual() )
    1298 [ +  - ][ +  - ]:        272 :         rOutStm << MakeSlotName( SvHash_RecordManual() ).getStr() << '|';
         [ +  - ][ +  - ]
    1299 [ +  - ][ +  + ]:      10954 :     if( GetNoRecord() )
    1300 [ +  - ][ +  - ]:         30 :         rOutStm << MakeSlotName( SvHash_NoRecord() ).getStr() << '|';
         [ +  - ][ +  - ]
    1301 [ +  - ][ +  + ]:      10954 :     if( GetRecordAbsolute() )
    1302 [ +  - ][ +  - ]:          8 :         rOutStm << MakeSlotName( SvHash_RecordAbsolute() ).getStr() << '|';
         [ +  - ][ +  - ]
    1303 [ +  - ][ +  + ]:      10954 :     if( GetHasDialog() )
    1304 [ +  - ][ +  - ]:       1714 :         rOutStm << MakeSlotName( SvHash_HasDialog() ).getStr() << '|';
         [ +  - ][ +  - ]
    1305 [ +  - ][ +  + ]:      10954 :     if( GetMenuConfig() )
    1306 [ +  - ][ +  - ]:       6894 :         rOutStm << MakeSlotName( SvHash_MenuConfig() ).getStr() << '|';
         [ +  - ][ +  - ]
    1307 [ +  - ][ +  + ]:      10954 :     if( GetToolBoxConfig() )
    1308 [ +  - ][ +  - ]:       7380 :         rOutStm << MakeSlotName( SvHash_ToolBoxConfig() ).getStr() << '|';
         [ +  - ][ +  - ]
    1309 [ +  - ][ +  + ]:      10954 :     if( GetStatusBarConfig() )
    1310 [ +  - ][ +  - ]:        188 :         rOutStm << MakeSlotName( SvHash_StatusBarConfig() ).getStr() << '|';
         [ +  - ][ +  - ]
    1311 [ +  - ][ +  + ]:      10954 :     if( GetAccelConfig() )
    1312 [ +  - ][ +  - ]:       7080 :         rOutStm << MakeSlotName( SvHash_AccelConfig() ).getStr() << '|';
         [ +  - ][ +  - ]
    1313 [ +  - ][ +  + ]:      10954 :     if( GetFastCall() )
    1314 [ +  - ][ +  - ]:       2028 :         rOutStm << MakeSlotName( SvHash_FastCall() ).getStr() << '|';
         [ +  - ][ +  - ]
    1315 [ +  - ][ +  + ]:      10954 :     if( GetContainer() )
    1316 [ +  - ][ +  - ]:        414 :         rOutStm << MakeSlotName( SvHash_Container() ).getStr() << '|';
         [ +  - ][ +  - ]
    1317 [ +  - ][ +  + ]:      10954 :     if ( GetReadOnlyDoc() )
    1318 [ +  - ][ +  - ]:       3764 :         rOutStm << MakeSlotName( SvHash_ReadOnlyDoc() ).getStr() << '|';
         [ +  - ][ +  - ]
    1319 [ +  - ][ +  + ]:      10954 :     if( GetImageRotation() )
    1320 [ +  - ][ +  - ]:        240 :         rOutStm << MakeSlotName( SvHash_ImageRotation() ).getStr() << '|';
         [ +  - ][ +  - ]
    1321 [ +  - ][ +  + ]:      10954 :     if( GetImageReflection() )
    1322 [ +  - ][ +  - ]:        162 :         rOutStm << MakeSlotName( SvHash_ImageReflection() ).getStr() << '|';
         [ +  - ][ +  - ]
    1323         [ +  - ]:      10954 :     rOutStm << '0';
    1324                 :            : 
    1325 [ +  - ][ +  - ]:      10954 :     rOutStm << ',' << endl;
    1326         [ +  - ]:      10954 :        WriteTab( rOutStm, 4 );
    1327 [ +  - ][ +  + ]:      10954 :     if ( GetDisableFlags().isEmpty() )
    1328         [ +  - ]:       9088 :         rOutStm << "0";
    1329                 :            :     else
    1330 [ +  - ][ +  - ]:       1866 :         rOutStm << GetDisableFlags().getStr();
    1331                 :            : 
    1332                 :            :     // write attribute type
    1333         [ +  + ]:      10954 :     if( !bIsEnumSlot )
    1334                 :            :     {
    1335 [ +  - ][ +  - ]:      10818 :         rOutStm << ',' << endl;
    1336         [ +  - ]:      10818 :         WriteTab( rOutStm, 4 );
    1337                 :            : 
    1338         [ +  - ]:      10818 :         SvMetaType * pT = GetSlotType();
    1339         [ +  + ]:      10818 :         if( !pT )
    1340                 :            :         {
    1341 [ +  - ][ +  + ]:       9888 :             if( !IsVariable() )
    1342         [ +  - ]:       5520 :                 pT = rBase.FindType( "SfxVoidItem" );
    1343                 :            :             else
    1344         [ +  - ]:       4368 :                 pT = GetType();
    1345                 :            :         }
    1346         [ +  - ]:      10818 :         if( pT )
    1347                 :            :         {
    1348 [ +  - ][ +  - ]:      10818 :             rOutStm << pT->GetName().getString().getStr();
    1349 [ +  - ][ +  + ]:      10818 :             if( !rBase.FindType( pT, rBase.aUsedTypes ) )
    1350         [ +  - ]:        586 :                 rBase.aUsedTypes.push_back( pT );
    1351                 :            :         }
    1352                 :            :         else
    1353         [ #  # ]:          0 :             rOutStm << "SfxVoidItem not defined";
    1354                 :            :     }
    1355                 :            :     else
    1356                 :            :     {
    1357         [ +  - ]:        136 :         SvMetaType *pT = rBase.FindType( "SfxBoolItem" );
    1358 [ +  - ][ -  + ]:        136 :         if ( pT && !rBase.FindType( pT, rBase.aUsedTypes ) )
         [ -  + ][ +  - ]
    1359         [ #  # ]:          0 :             rBase.aUsedTypes.push_back( pT );
    1360                 :            :     }
    1361                 :            : 
    1362         [ +  + ]:      10954 :     if( !bIsEnumSlot )
    1363                 :            :     {
    1364 [ +  - ][ +  - ]:      10818 :         rOutStm << ',' << endl;
    1365         [ +  - ]:      10818 :         WriteTab( rOutStm, 4 );
    1366                 :            :         rOutStm
    1367         [ +  - ]:      21636 :             << rtl::OString::valueOf(static_cast<sal_Int32>(nCount)).getStr()
    1368         [ +  - ]:      10818 :             << "/*Offset*/, ";
    1369                 :            : 
    1370 [ +  + ][ +  - ]:      10818 :         if( IsMethod() )
    1371                 :            :         {
    1372         [ +  - ]:       6490 :             SvMetaAttribute * pMethod = GetMethod();
    1373                 :            :             SvMetaType * pType;
    1374         [ +  + ]:       6490 :             if( pMethod )
    1375         [ +  - ]:         44 :                 pType = pMethod->GetType();
    1376                 :            :             else
    1377         [ +  - ]:       6446 :                 pType = GetType();
    1378         [ +  - ]:       6490 :             sal_uLong nSCount = pType->GetAttrCount();
    1379                 :            :             rOutStm
    1380                 :            :                 << rtl::OString::valueOf(static_cast<sal_Int32>(
    1381         [ +  - ]:      12980 :                     nSCount)).getStr()
    1382         [ +  - ]:       6490 :                 << "/*Count*/";
    1383                 :            :         }
    1384                 :            :         else
    1385         [ +  - ]:       4328 :             rOutStm << '0';
    1386                 :            : 
    1387                 :            :         // name for recording
    1388 [ +  - ][ +  + ]:      10818 :         if ( GetExport() )
    1389                 :            :         {
    1390         [ +  - ]:       9778 :             rOutStm << ",\"";
    1391         [ +  + ]:       9778 :             if (!rPrefix.isEmpty())
    1392         [ +  - ]:        132 :                 rOutStm << rPrefix.getStr();
    1393         [ +  - ]:       9778 :             rOutStm << '.';
    1394 [ +  - ][ +  + ]:      13710 :             if ( !IsVariable() || !GetType() ||
                 [ +  - ]
           [ +  -  +  + ]
                 [ +  + ]
    1395 [ +  - ][ +  - ]:       3932 :                  GetType()->GetBaseType()->GetType() != TYPE_STRUCT )
    1396 [ +  - ][ +  - ]:       9276 :                 rOutStm << GetMangleName( sal_False ).getStr();
    1397         [ +  - ]:       9778 :             rOutStm << "\",";
    1398                 :            :         }
    1399                 :            :         else
    1400         [ +  - ]:       1040 :             rOutStm << ", 0, ";
    1401                 :            : 
    1402                 :            :         // Method/Property flags
    1403 [ +  - ][ +  + ]:      10818 :         if( IsMethod() )
    1404         [ +  - ]:       6490 :             rOutStm << "SFX_SLOT_METHOD|";
    1405 [ +  - ][ +  + ]:      10818 :         if( IsVariable() )
    1406                 :            :         {
    1407         [ +  - ]:       4372 :             rOutStm << "SFX_SLOT_PROPGET|";
    1408 [ +  - ][ +  + ]:       4372 :             if( !GetReadonly() )
    1409         [ +  - ]:       4094 :                 rOutStm << "SFX_SLOT_PROPSET|";
    1410                 :            :         }
    1411                 :            : 
    1412         [ +  - ]:      10818 :         rOutStm << '0';
    1413                 :            :     }
    1414                 :            : 
    1415                 :            :     {
    1416         [ +  - ]:      10954 :         rOutStm << ",\"";
    1417 [ +  - ][ +  - ]:      10954 :         rOutStm << GetMangleName( sal_False ).getStr();
    1418         [ +  - ]:      10954 :         rOutStm << "\"";
    1419                 :            :     }
    1420                 :            : 
    1421 [ +  - ][ +  - ]:      10954 :     rOutStm << " )," << endl;
    1422                 :            : }
    1423                 :            : 
    1424                 :      10954 : sal_uInt16 SvMetaSlot::WriteSlotParamArray( SvIdlDataBase & rBase, SvStream & rOutStm )
    1425                 :            : {
    1426 [ +  + ][ -  + ]:      10954 :     if ( !GetExport() && !GetHidden() )
                 [ -  + ]
    1427                 :          0 :         return 0;
    1428                 :            : 
    1429                 :      10954 :     SvMetaAttribute * pMethod = GetMethod();
    1430         [ +  + ]:      10954 :     if( IsMethod() )
    1431                 :            :     {
    1432                 :            :         SvMetaType * pType;
    1433         [ +  + ]:       6534 :         if( pMethod )
    1434                 :         44 :             pType = pMethod->GetType();
    1435                 :            :         else
    1436                 :       6490 :             pType = GetType();
    1437                 :            : 
    1438         [ +  + ]:       6534 :         if( !rBase.FindType( pType, rBase.aUsedTypes ) )
    1439                 :       3658 :             rBase.aUsedTypes.push_back( pType );
    1440                 :            : 
    1441                 :            :         const SvMetaAttributeMemberList & rList =
    1442                 :       6534 :                     pType->GetAttrList();
    1443         [ +  + ]:      11214 :         for( sal_uLong n = 0; n < rList.size(); n++ )
    1444                 :            :         {
    1445                 :       4680 :             SvMetaAttribute * pPar  = rList[n];
    1446                 :       4680 :             SvMetaType * pPType     = pPar->GetType();
    1447                 :       4680 :             WriteTab( rOutStm, 1 );
    1448                 :       4680 :             rOutStm << "SFX_ARGUMENT("
    1449                 :       9360 :                 << pPar->GetSlotId().getString().getStr() << ',' // SlodId
    1450                 :            :                 // parameter name
    1451                 :       9360 :                 << "\"" << pPar->GetName().getString().getStr() << "\","
    1452                 :            :                 // item name
    1453                 :       9360 :                 << pPType->GetName().getString().getStr() << ")," << endl;
    1454         [ +  + ]:       4680 :             if( !rBase.FindType( pPType, rBase.aUsedTypes ) )
    1455                 :        220 :                 rBase.aUsedTypes.push_back( pPType );
    1456                 :            :         }
    1457                 :       6534 :         return (sal_uInt16)rList.size();
    1458                 :            :     }
    1459                 :      10954 :     return 0;
    1460                 :            : }
    1461                 :            : 
    1462                 :      10954 : sal_uInt16 SvMetaSlot::WriteSlotMap( const rtl::OString& rShellName, sal_uInt16 nCount,
    1463                 :            :                                 SvSlotElementList& rSlotList,
    1464                 :            :                                 size_t nStart,
    1465                 :            :                                 const rtl::OString& rPrefix,
    1466                 :            :                                 SvIdlDataBase & rBase,
    1467                 :            :                                 SvStream & rOutStm )
    1468                 :            : {
    1469                 :            :     // SlotId, if not specified generate from name
    1470         [ +  - ]:      10954 :     rtl::OString slotId = GetSlotId().getString();
    1471                 :            : 
    1472                 :      10954 :     sal_uInt16 nSCount = 0;
    1473 [ +  + ][ +  - ]:      10954 :     if( IsMethod() )
    1474                 :            :     {
    1475                 :            :         SvMetaType * pType;
    1476         [ +  - ]:       6534 :         SvMetaAttribute * pMethod = GetMethod();
    1477         [ +  + ]:       6534 :         if( pMethod )
    1478         [ +  - ]:         44 :             pType = pMethod->GetType();
    1479                 :            :         else
    1480         [ +  - ]:       6490 :             pType = GetType();
    1481                 :            : 
    1482         [ +  - ]:       6534 :         nSCount = (sal_uInt16)pType->GetAttrCount();
    1483                 :            :     }
    1484                 :            : 
    1485         [ +  - ]:      10954 :     WriteSlot( rShellName, nCount, slotId, rSlotList, nStart, rPrefix, rBase, rOutStm );
    1486                 :      10954 :     return nSCount;
    1487                 :            : }
    1488                 :            : 
    1489                 :      23602 : void SvMetaSlot::WriteHelpId( SvIdlDataBase & rBase, SvStream & rOutStm,
    1490                 :            :                              HelpIdTable&  rTable )
    1491                 :            : {
    1492         [ +  - ]:      23602 :     sal_uLong nSId = GetSlotId().GetValue();
    1493 [ +  + ][ +  - ]:      23602 :     if( rTable.find( nSId ) == rTable.end() )
    1494                 :            :     {
    1495         [ +  - ]:      15932 :         rTable[ nSId ] = this;
    1496 [ +  - ][ +  - ]:      15932 :         rOutStm << "#define " << GetSlotId().getString().getStr() << '\t'
         [ +  - ][ +  - ]
    1497         [ +  - ]:      47796 :             << rtl::OString::valueOf(static_cast<sal_Int32>(nSId)).getStr()
    1498         [ +  - ]:      15932 :             << endl;
    1499                 :            :     }
    1500                 :            : 
    1501 [ +  - ][ +  - ]:      23602 :     SvMetaTypeEnum * pEnum = PTR_CAST( SvMetaTypeEnum, GetType() );
         [ +  - ][ +  - ]
         [ +  - ][ -  + ]
                 [ #  # ]
    1502 [ +  - ][ +  + ]:      23602 :     if( GetPseudoSlots() && pEnum )
         [ -  + ][ -  + ]
    1503                 :            :     {
    1504 [ #  # ][ #  # ]:          0 :         for( sal_uLong n = 0; n < pEnum->Count(); ++n )
    1505                 :            :         {
    1506 [ #  # ][ #  # ]:          0 :             rtl::OString aValName = pEnum->GetObject( n )->GetName().getString();
    1507                 :            : 
    1508                 :          0 :             rtl::OStringBuffer aBuf;
    1509 [ #  # ][ #  # ]:          0 :             if( !GetPseudoPrefix().isEmpty() )
    1510 [ #  # ][ #  # ]:          0 :                 aBuf.append(GetPseudoPrefix());
    1511                 :            :             else
    1512 [ #  # ][ #  # ]:          0 :                 aBuf.append(GetSlotId().getString());
    1513         [ #  # ]:          0 :             aBuf.append('_');
    1514         [ #  # ]:          0 :             aBuf.append(aValName.copy(pEnum->GetPrefix().getLength()));
    1515                 :            : 
    1516                 :          0 :             rtl::OString aSId = aBuf.makeStringAndClear();
    1517                 :            : 
    1518                 :            :             sal_uLong nSId2;
    1519                 :          0 :             sal_Bool bIdOk = sal_False;
    1520 [ #  # ][ #  # ]:          0 :             if( rBase.FindId( aSId, &nSId2 ) )
    1521                 :            :             {
    1522                 :          0 :                 aSId = rtl::OString::valueOf(static_cast<sal_Int32>(nSId2));
    1523                 :          0 :                 bIdOk = sal_True;
    1524                 :            :             }
    1525                 :            : 
    1526                 :            :             // if id not found, write always
    1527 [ #  # ][ #  # ]:          0 :             if( !bIdOk || rTable.find( nSId2 ) == rTable.end() )
         [ #  # ][ #  # ]
         [ #  # ][ #  #  
             #  #  #  # ]
    1528                 :            :             {
    1529         [ #  # ]:          0 :                 rTable[ nSId2 ] = this;
    1530                 :            : 
    1531 [ #  # ][ #  # ]:          0 :                 rOutStm << "#define " << aSId.getStr() << '\t'
                 [ #  # ]
    1532                 :            :                     << rtl::OString::valueOf(
    1533         [ #  # ]:          0 :                         static_cast<sal_Int32>(nSId2)).getStr()
    1534         [ #  # ]:          0 :                     << endl;
    1535                 :            :             }
    1536                 :          0 :         }
    1537                 :            :     }
    1538                 :      23602 : }
    1539                 :            : 
    1540                 :          0 : void WriteBool( sal_Bool bSet, SvStream& rStream )
    1541                 :            : {
    1542         [ #  # ]:          0 :     if ( bSet )
    1543                 :          0 :         rStream << "TRUE" << ',';
    1544                 :            :     else
    1545                 :          0 :         rStream << "FALSE" << ',';
    1546                 :          0 : }
    1547                 :            : 
    1548                 :          0 : void SvMetaSlot::WriteCSV( SvIdlDataBase& rBase, SvStream& rStrm )
    1549                 :            : {
    1550                 :          0 :     rStrm << "PROJECT,";
    1551                 :          0 :     rStrm << GetSlotId().getString().getStr() << ',';
    1552                 :            :     rStrm
    1553                 :            :         << rtl::OString::valueOf(
    1554         [ #  # ]:          0 :             static_cast<sal_Int32>(GetSlotId().GetValue())).getStr()
    1555         [ #  # ]:          0 :         << ',';
    1556                 :            : 
    1557         [ #  # ]:          0 :     if ( !GetPseudoPrefix().isEmpty() )
    1558                 :          0 :         rStrm << GetPseudoPrefix().getStr() << ',';
    1559                 :            :     else
    1560                 :          0 :         rStrm << ',';
    1561                 :            : 
    1562                 :          0 :     rStrm << GetGroupId().getStr() << ',';
    1563                 :            : 
    1564                 :          0 :     WriteBool( GetAccelConfig(), rStrm );
    1565                 :          0 :     WriteBool( GetMenuConfig(), rStrm );
    1566                 :          0 :     WriteBool( GetStatusBarConfig(), rStrm );
    1567                 :          0 :     WriteBool( GetToolBoxConfig(), rStrm );
    1568                 :            : 
    1569         [ #  # ]:          0 :     if ( GetSlotType() )
    1570                 :          0 :         rStrm << GetSlotType()->GetName().getString().getStr() << ',';
    1571                 :            :     else
    1572                 :          0 :         rStrm << ',';
    1573                 :            : 
    1574                 :          0 :     WriteBool( GetAutoUpdate(), rStrm );
    1575         [ #  # ]:          0 :     if ( GetCachable() )
    1576                 :          0 :         rStrm << "Cachable" << ',';
    1577                 :            :     else
    1578                 :          0 :         rStrm << "Volatile" << ',';
    1579                 :            : 
    1580                 :          0 :     WriteBool( GetContainer(), rStrm );
    1581                 :          0 :     WriteBool( GetFastCall(), rStrm );
    1582                 :          0 :     WriteBool( GetHasCoreId(), rStrm );
    1583                 :          0 :     WriteBool( GetHasDialog(), rStrm );
    1584                 :          0 :     WriteBool( GetReadOnlyDoc(), rStrm );
    1585                 :          0 :     WriteBool( GetImageRotation(), rStrm );
    1586                 :          0 :     WriteBool( GetImageReflection(), rStrm );
    1587                 :          0 :     rStrm << GetDisableFlags().getStr() << ',';
    1588                 :            : 
    1589         [ #  # ]:          0 :     if( GetSynchron() )
    1590                 :          0 :         rStrm << "Synchron" << ',';
    1591                 :            :     else
    1592                 :          0 :         rStrm << "Asynchron" << ',';
    1593                 :            : 
    1594                 :          0 :     WriteBool( GetToggle(), rStrm );
    1595                 :          0 :     WriteBool( GetReadonly(), rStrm );
    1596                 :          0 :     WriteBool( GetExport(), rStrm );
    1597         [ #  # ]:          0 :     if( GetRecordPerItem() )
    1598                 :          0 :         rStrm << "RecordPerItem" << ',';
    1599         [ #  # ]:          0 :     else if ( GetNoRecord() )
    1600                 :          0 :         rStrm << "NoRecord" << ',';
    1601         [ #  # ]:          0 :     else if ( GetRecordManual() )
    1602                 :          0 :         rStrm << "RecordManual" << ',';
    1603                 :            :     else
    1604                 :          0 :         rStrm << "RecordPerSet" << ',';
    1605                 :            : 
    1606                 :          0 :     WriteBool( GetRecordAbsolute(), rStrm );
    1607                 :            : 
    1608 [ #  # ][ #  # ]:          0 :     if ( GetType()->GetType() != TYPE_METHOD && GetMethod() )
                 [ #  # ]
    1609                 :            :     {
    1610                 :          0 :         rStrm << GetMethod()->GetType()->GetReturnType()->GetName().getString().getStr() << ',';
    1611                 :          0 :         rStrm << GetMethod()->GetName().getString().getStr() << ',';
    1612                 :            :     }
    1613                 :            :     else
    1614                 :            :     {
    1615                 :          0 :         rStrm << ",,";
    1616                 :            :     }
    1617                 :            : 
    1618                 :          0 :     rStrm << GetType()->GetSvName().getStr() << ',';
    1619                 :          0 :     rStrm << GetName().getString().getStr() << ',';
    1620                 :            : 
    1621 [ #  # ][ #  # ]:          0 :     if ( GetType()->GetType() == TYPE_METHOD || GetMethod() )
                 [ #  # ]
    1622                 :            :     {
    1623                 :          0 :         SvMetaAttributeMemberList *pList = &GetType()->GetAttrList();
    1624         [ #  # ]:          0 :            if ( GetMethod() )
    1625                 :          0 :             pList = &GetMethod()->GetType()->GetAttrList();
    1626                 :            : 
    1627 [ #  # ][ #  # ]:          0 :         if( pList && !pList->empty() )
                 [ #  # ]
    1628                 :            :         {
    1629         [ #  # ]:          0 :             rStrm << "\"(";
    1630         [ #  # ]:          0 :             SvMetaAttributeMemberList::const_iterator it = pList->begin();
    1631 [ #  # ][ #  # ]:          0 :             while( it != pList->end() )
    1632                 :            :             {
    1633                 :          0 :                 SvMetaAttribute* pAttr = *it;
    1634         [ #  # ]:          0 :                 pAttr->WriteCSV( rBase, rStrm );
    1635                 :          0 :                 ++it;
    1636 [ #  # ][ #  # ]:          0 :                 if( it != pList->end() )
    1637         [ #  # ]:          0 :                     rStrm << ',';
    1638                 :            :             }
    1639         [ #  # ]:          0 :             rStrm << ")\"";
    1640                 :            :         }
    1641                 :            :         else
    1642                 :          0 :             rStrm << "()";
    1643                 :            :     }
    1644                 :            : 
    1645                 :          0 :     rStrm << endl;
    1646                 :          0 : }
    1647                 :            : 
    1648                 :            : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10