LCOV - code coverage report
Current view: top level - forms/source/component - navigationbar.cxx (source / functions) Hit Total Coverage
Test: commit 0e63ca4fde4e446f346e35849c756a30ca294aab Lines: 198 221 89.6 %
Date: 2014-04-11 Functions: 23 24 95.8 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
       2             : /*
       3             :  * This file is part of the LibreOffice project.
       4             :  *
       5             :  * This Source Code Form is subject to the terms of the Mozilla Public
       6             :  * License, v. 2.0. If a copy of the MPL was not distributed with this
       7             :  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
       8             :  *
       9             :  * This file incorporates work covered by the following license notice:
      10             :  *
      11             :  *   Licensed to the Apache Software Foundation (ASF) under one or more
      12             :  *   contributor license agreements. See the NOTICE file distributed
      13             :  *   with this work for additional information regarding copyright
      14             :  *   ownership. The ASF licenses this file to you under the Apache
      15             :  *   License, Version 2.0 (the "License"); you may not use this file
      16             :  *   except in compliance with the License. You may obtain a copy of
      17             :  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
      18             :  */
      19             : 
      20             : #include "navigationbar.hxx"
      21             : #include "frm_module.hxx"
      22             : 
      23             : #include <com/sun/star/text/WritingMode2.hpp>
      24             : 
      25             : #include <comphelper/streamsection.hxx>
      26             : #include <comphelper/basicio.hxx>
      27             : #include <comphelper/processfactory.hxx>
      28             : 
      29             : 
      30          17 : extern "C" void SAL_CALL createRegistryInfo_ONavigationBarModel()
      31             : {
      32          17 :     static ::frm::OMultiInstanceAutoRegistration< ::frm::ONavigationBarModel > aAutoRegistration;
      33          17 : }
      34             : 
      35             : 
      36             : namespace frm
      37             : {
      38             : 
      39             : 
      40             :     using namespace ::com::sun::star::uno;
      41             :     using namespace ::com::sun::star::beans;
      42             :     using namespace ::com::sun::star::form;
      43             :     using namespace ::com::sun::star::awt;
      44             :     using namespace ::com::sun::star::io;
      45             :     using namespace ::com::sun::star::lang;
      46             :     using namespace ::com::sun::star::util;
      47             :     using namespace ::com::sun::star::container;
      48             :     using namespace ::comphelper;
      49             : 
      50             :     namespace WritingMode2 = ::com::sun::star::text::WritingMode2;
      51             : 
      52             : #define REGISTER_VOID_PROP( prop, memberAny, type ) \
      53             :     registerMayBeVoidProperty( PROPERTY_##prop, PROPERTY_ID_##prop, PropertyAttribute::BOUND | PropertyAttribute::MAYBEDEFAULT | PropertyAttribute::MAYBEVOID, \
      54             :         &memberAny, ::getCppuType( static_cast< type* >( NULL ) ) );
      55             : 
      56             : 
      57             :     // ONavigationBarModel
      58             : 
      59             : 
      60          10 :     ONavigationBarModel::ONavigationBarModel( const Reference< XComponentContext >& _rxFactory )
      61             :         :OControlModel( _rxFactory, OUString() )
      62          10 :         ,FontControlModel( true )
      63             :     {
      64             : 
      65          10 :         m_nClassId = FormComponentType::NAVIGATIONBAR;
      66          10 :         implInitPropertyContainer();
      67             : 
      68          10 :         getPropertyDefaultByHandle( PROPERTY_ID_DEFAULTCONTROL          ) >>= m_sDefaultControl;
      69          10 :         getPropertyDefaultByHandle( PROPERTY_ID_ICONSIZE                ) >>= m_nIconSize;
      70          10 :         getPropertyDefaultByHandle( PROPERTY_ID_BORDER                  ) >>= m_nBorder;
      71          10 :         getPropertyDefaultByHandle( PROPERTY_ID_DELAY                   ) >>= m_nDelay;
      72          10 :         getPropertyDefaultByHandle( PROPERTY_ID_ENABLED                 ) >>= m_bEnabled;
      73          10 :         getPropertyDefaultByHandle( PROPERTY_ID_ENABLEVISIBLE           ) >>= m_bEnableVisible;
      74          10 :         getPropertyDefaultByHandle( PROPERTY_ID_SHOW_POSITION           ) >>= m_bShowPosition;
      75          10 :         getPropertyDefaultByHandle( PROPERTY_ID_SHOW_NAVIGATION         ) >>= m_bShowNavigation;
      76          10 :         getPropertyDefaultByHandle( PROPERTY_ID_SHOW_RECORDACTIONS      ) >>= m_bShowActions;
      77          10 :         getPropertyDefaultByHandle( PROPERTY_ID_SHOW_FILTERSORT         ) >>= m_bShowFilterSort;
      78          10 :         getPropertyDefaultByHandle( PROPERTY_ID_WRITING_MODE            ) >>= m_nWritingMode;
      79          10 :         getPropertyDefaultByHandle( PROPERTY_ID_CONTEXT_WRITING_MODE    ) >>= m_nContextWritingMode;
      80          10 :     }
      81             : 
      82             : 
      83           1 :     ONavigationBarModel::ONavigationBarModel( const ONavigationBarModel* _pOriginal, const Reference< XComponentContext >& _rxFactory )
      84             :         :OControlModel( _pOriginal, _rxFactory )
      85           1 :         ,FontControlModel( _pOriginal )
      86             :     {
      87             : 
      88           1 :         implInitPropertyContainer();
      89             : 
      90           1 :         m_aTabStop              = _pOriginal->m_aTabStop;
      91           1 :         m_aBackgroundColor      = _pOriginal->m_aBackgroundColor;
      92           1 :         m_sDefaultControl       = _pOriginal->m_sDefaultControl;
      93           1 :         m_sHelpText             = _pOriginal->m_sHelpText;
      94           1 :         m_sHelpURL              = _pOriginal->m_sHelpURL;
      95           1 :         m_bEnabled              = _pOriginal->m_bEnabled;
      96           1 :         m_bEnableVisible        = _pOriginal->m_bEnableVisible;
      97           1 :         m_nIconSize             = _pOriginal->m_nIconSize;
      98           1 :         m_nBorder               = _pOriginal->m_nBorder;
      99           1 :         m_nDelay                = _pOriginal->m_nDelay;
     100           1 :         m_bShowPosition         = _pOriginal->m_bShowPosition;
     101           1 :         m_bShowNavigation       = _pOriginal->m_bShowNavigation;
     102           1 :         m_bShowActions          = _pOriginal->m_bShowActions;
     103           1 :         m_bShowFilterSort       = _pOriginal->m_bShowFilterSort;
     104           1 :         m_nWritingMode          = _pOriginal->m_nWritingMode;
     105           1 :         m_nContextWritingMode   = _pOriginal->m_nContextWritingMode;
     106           1 :     }
     107             : 
     108             : 
     109          11 :     void ONavigationBarModel::implInitPropertyContainer()
     110             :     {
     111          11 :         REGISTER_PROP_2( DEFAULTCONTROL,      m_sDefaultControl,        BOUND, MAYBEDEFAULT );
     112          11 :         REGISTER_PROP_2( HELPTEXT,            m_sHelpText,              BOUND, MAYBEDEFAULT );
     113          11 :         REGISTER_PROP_2( HELPURL,             m_sHelpURL,               BOUND, MAYBEDEFAULT );
     114          11 :         REGISTER_PROP_2( ENABLED,             m_bEnabled,               BOUND, MAYBEDEFAULT );
     115          11 :         REGISTER_PROP_2( ENABLEVISIBLE,       m_bEnableVisible,         BOUND, MAYBEDEFAULT );
     116          11 :         REGISTER_PROP_2( ICONSIZE,            m_nIconSize,              BOUND, MAYBEDEFAULT );
     117          11 :         REGISTER_PROP_2( BORDER,              m_nBorder,                BOUND, MAYBEDEFAULT );
     118          11 :         REGISTER_PROP_2( DELAY,               m_nDelay,                 BOUND, MAYBEDEFAULT );
     119          11 :         REGISTER_PROP_2( SHOW_POSITION,       m_bShowPosition,          BOUND, MAYBEDEFAULT );
     120          11 :         REGISTER_PROP_2( SHOW_NAVIGATION,     m_bShowNavigation,        BOUND, MAYBEDEFAULT );
     121          11 :         REGISTER_PROP_2( SHOW_RECORDACTIONS,  m_bShowActions,           BOUND, MAYBEDEFAULT );
     122          11 :         REGISTER_PROP_2( SHOW_FILTERSORT,     m_bShowFilterSort,        BOUND, MAYBEDEFAULT );
     123          11 :         REGISTER_PROP_2( WRITING_MODE,        m_nWritingMode,           BOUND, MAYBEDEFAULT );
     124          11 :         REGISTER_PROP_3( CONTEXT_WRITING_MODE,m_nContextWritingMode,    BOUND, MAYBEDEFAULT, TRANSIENT );
     125             : 
     126          11 :         REGISTER_VOID_PROP( TABSTOP,         m_aTabStop,         sal_Bool );
     127          11 :         REGISTER_VOID_PROP( BACKGROUNDCOLOR, m_aBackgroundColor, sal_Int32 );
     128          11 :     }
     129             : 
     130             : 
     131          33 :     ONavigationBarModel::~ONavigationBarModel()
     132             :     {
     133          11 :         if ( !OComponentHelper::rBHelper.bDisposed )
     134             :         {
     135           0 :             acquire();
     136           0 :             dispose();
     137             :         }
     138             : 
     139          22 :     }
     140             : 
     141             : 
     142        3294 :     Any SAL_CALL ONavigationBarModel::queryAggregation( const Type& _rType ) throw ( RuntimeException, std::exception )
     143             :     {
     144        3294 :         Any aReturn = ONavigationBarModel_BASE::queryInterface( _rType );
     145             : 
     146        3294 :         if ( !aReturn.hasValue() )
     147        1175 :             aReturn = OControlModel::queryAggregation( _rType );
     148             : 
     149        3294 :         return aReturn;
     150             :     }
     151             : 
     152             : 
     153           2 :     IMPLEMENT_FORWARD_XTYPEPROVIDER2( ONavigationBarModel, OControlModel, ONavigationBarModel_BASE )
     154             : 
     155             : 
     156           1 :     IMPLEMENT_DEFAULT_CLONING( ONavigationBarModel )
     157             : 
     158             : 
     159           6 :     OUString SAL_CALL ONavigationBarModel::getImplementationName()  throw(RuntimeException, std::exception)
     160             :     {
     161           6 :         return getImplementationName_Static();
     162             :     }
     163             : 
     164             : 
     165           5 :     Sequence< OUString > SAL_CALL ONavigationBarModel::getSupportedServiceNames()  throw(RuntimeException, std::exception)
     166             :     {
     167           5 :         return getSupportedServiceNames_Static();
     168             :     }
     169             : 
     170             : 
     171          40 :     OUString SAL_CALL ONavigationBarModel::getImplementationName_Static()
     172             :     {
     173          40 :         return OUString( "com.sun.star.comp.form.ONavigationBarModel" );
     174             :     }
     175             : 
     176             : 
     177          22 :     Sequence< OUString > SAL_CALL ONavigationBarModel::getSupportedServiceNames_Static()
     178             :     {
     179          22 :         Sequence< OUString > aSupported = OControlModel::getSupportedServiceNames_Static();
     180          22 :         aSupported.realloc( aSupported.getLength() + 2 );
     181             : 
     182          22 :         OUString* pArray = aSupported.getArray();
     183          22 :         pArray[ aSupported.getLength() - 2 ] = "com.sun.star.awt.UnoControlModel";
     184          22 :         pArray[ aSupported.getLength() - 1 ] = FRM_SUN_COMPONENT_NAVTOOLBAR;
     185          22 :         return aSupported;
     186             :     }
     187             : 
     188             : 
     189          10 :     Reference< XInterface > SAL_CALL ONavigationBarModel::Create( const Reference< XMultiServiceFactory >& _rxFactory )
     190             :     {
     191          10 :         return *( new ONavigationBarModel( comphelper::getComponentContext(_rxFactory) ) );
     192             :     }
     193             : 
     194             : 
     195          11 :     void SAL_CALL ONavigationBarModel::disposing()
     196             :     {
     197          11 :         OControlModel::disposing( );
     198          11 :     }
     199             : 
     200             : 
     201           1 :     OUString SAL_CALL ONavigationBarModel::getServiceName() throw ( RuntimeException, std::exception )
     202             :     {
     203           1 :         return OUString(FRM_SUN_COMPONENT_NAVTOOLBAR);
     204             :     }
     205             : 
     206             : 
     207             :     #define PERSIST_TABSTOP         0x0001
     208             :     #define PERSIST_BACKGROUND      0x0002
     209             :     #define PERSIST_TEXTCOLOR       0x0004
     210             :     #define PERSIST_TEXTLINECOLOR   0x0008
     211             : 
     212             :     #define PERSIST_ENABLED         0x0001
     213             :     #define PERSIST_LARGEICONS      0x0002
     214             :         // leaf a leap here - this will allow for two more icon size values to be stored compatibly
     215             :     #define PERSIST_SHOW_POSITION   0x0008
     216             :     #define PERSIST_SHOW_NAVIGATION 0x0010
     217             :     #define PERSIST_SHOW_ACTIONS    0x0020
     218             :     #define PERSIST_SHOW_FILTERSORT 0x0040
     219             : 
     220             : 
     221           1 :     void SAL_CALL ONavigationBarModel::write( const Reference< XObjectOutputStream >& _rxOutStream ) throw ( IOException, RuntimeException, std::exception )
     222             :     {
     223             :         // open a section for compatibility - if we later on write additional members,
     224             :         // then older versions can skip them
     225           1 :         OStreamSection aEnsureBlockCompat( _rxOutStream );
     226             : 
     227             :         // base class
     228           1 :         OControlModel::write( _rxOutStream );
     229             : 
     230             :         {
     231           1 :             OStreamSection aEnsureCompat( _rxOutStream );
     232             :             // determine which properties are not void and need to be written
     233           1 :             sal_Int32 nNonVoids = 0;
     234           1 :             if ( m_aTabStop.hasValue() )
     235           0 :                 nNonVoids |= PERSIST_TABSTOP;
     236           1 :             if ( m_aBackgroundColor.hasValue() )
     237           0 :                 nNonVoids |= PERSIST_BACKGROUND;
     238           1 :             if ( hasTextColor() )
     239           0 :                 nNonVoids |= PERSIST_TEXTCOLOR;
     240           1 :             if ( hasTextLineColor() )
     241           0 :                 nNonVoids |= PERSIST_TEXTLINECOLOR;
     242             : 
     243           1 :             _rxOutStream->writeLong( nNonVoids );
     244             : 
     245             :             // the maybeboid anys
     246           1 :             if ( nNonVoids & PERSIST_TABSTOP )
     247             :             {
     248           0 :                 sal_Bool bTabStop( sal_False );
     249           0 :                 m_aTabStop >>= bTabStop;
     250           0 :                 _rxOutStream->writeBoolean( bTabStop );
     251             :             }
     252           1 :             if ( nNonVoids & PERSIST_BACKGROUND )
     253             :             {
     254           0 :                 sal_Int32 nBackgroundColor = 0;
     255           0 :                 m_aBackgroundColor >>= nBackgroundColor;
     256           0 :                 _rxOutStream->writeLong( nBackgroundColor );
     257             :             }
     258           1 :             if ( nNonVoids & PERSIST_TEXTCOLOR )
     259             :             {
     260           0 :                _rxOutStream->writeLong( getTextColor() );
     261             :             }
     262           1 :             if ( nNonVoids & PERSIST_TEXTLINECOLOR )
     263             :             {
     264           0 :                 _rxOutStream->writeLong( getTextLineColor() );
     265           1 :             }
     266             :         }
     267             : 
     268             :         {
     269           1 :             OStreamSection aEnsureCompat( _rxOutStream );
     270           1 :             ::comphelper::operator<<( _rxOutStream, getFont() );
     271             :         }
     272             : 
     273             :         // our boolean flags
     274           1 :         sal_Int32 nFlags = 0;
     275           1 :         if ( m_bEnabled        ) nFlags |= PERSIST_ENABLED;
     276           1 :         if ( m_nIconSize       ) nFlags |= PERSIST_LARGEICONS;   // at the moment, this is quasi boolean
     277           1 :         if ( m_bShowPosition   ) nFlags |= PERSIST_SHOW_POSITION;
     278           1 :         if ( m_bShowNavigation ) nFlags |= PERSIST_SHOW_NAVIGATION;
     279           1 :         if ( m_bShowActions    ) nFlags |= PERSIST_SHOW_ACTIONS;
     280           1 :         if ( m_bShowFilterSort ) nFlags |= PERSIST_SHOW_FILTERSORT;
     281           1 :         _rxOutStream->writeLong( nFlags );
     282             : 
     283             :         // our strings
     284           1 :         _rxOutStream->writeUTF( m_sHelpText       );
     285           1 :         _rxOutStream->writeUTF( m_sHelpURL        );
     286           1 :         _rxOutStream->writeUTF( m_sDefaultControl );
     287             : 
     288             :         // misc
     289           1 :         _rxOutStream->writeShort( m_nBorder );
     290           1 :         _rxOutStream->writeLong ( m_nDelay  );
     291           1 :     }
     292             : 
     293             : 
     294           1 :     void SAL_CALL ONavigationBarModel::read( const Reference< XObjectInputStream >& _rxInStream ) throw ( IOException, RuntimeException, std::exception )
     295             :     {
     296           1 :         OStreamSection aEnsureBlockCompat( _rxInStream );
     297             : 
     298             :         // base class
     299           1 :         OControlModel::read( _rxInStream );
     300             : 
     301             :         {
     302           1 :             OStreamSection aEnsureCompat( _rxInStream );
     303             :             // determine which properties were non-void
     304           1 :             sal_Int32 nNonVoids = _rxInStream->readLong( );
     305             : 
     306             :             // the maybeboid anys
     307           1 :             if ( nNonVoids & PERSIST_TABSTOP )
     308           0 :                 m_aTabStop = makeAny( _rxInStream->readBoolean() );
     309             :             else
     310           1 :                 m_aTabStop.clear();
     311             : 
     312           1 :             if ( nNonVoids & PERSIST_BACKGROUND )
     313           0 :                 m_aBackgroundColor = makeAny( _rxInStream->readLong() );
     314             :             else
     315           1 :                 m_aBackgroundColor.clear();
     316             : 
     317           1 :             if ( nNonVoids & PERSIST_TEXTCOLOR )
     318           0 :                 setTextColor( _rxInStream->readLong() );
     319             :             else
     320           1 :                 clearTextColor();
     321             : 
     322           1 :             if ( nNonVoids & PERSIST_TEXTLINECOLOR )
     323           0 :                 setTextLineColor( _rxInStream->readLong() );
     324             :             else
     325           1 :                 clearTextLineColor();
     326             :         }
     327             : 
     328             :         {
     329           1 :             OStreamSection aEnsureCompat( _rxInStream );
     330           2 :             FontDescriptor aFont;
     331           1 :             ::comphelper::operator>>( _rxInStream, aFont );
     332           2 :             setFont( aFont );
     333             :         }
     334             : 
     335             :         // our boolean flags
     336           1 :         sal_Int32 nFlags = _rxInStream->readLong( );
     337           1 :         m_bEnabled        = ( nFlags & PERSIST_ENABLED         ) ? sal_True : sal_False;
     338           1 :         m_nIconSize       = ( nFlags & PERSIST_LARGEICONS      ) ?        1 :         0;
     339           1 :         m_bShowPosition   = ( nFlags & PERSIST_SHOW_POSITION   ) ? sal_True : sal_False;
     340           1 :         m_bShowNavigation = ( nFlags & PERSIST_SHOW_NAVIGATION ) ? sal_True : sal_False;
     341           1 :         m_bShowActions    = ( nFlags & PERSIST_SHOW_ACTIONS    ) ? sal_True : sal_False;
     342           1 :         m_bShowFilterSort = ( nFlags & PERSIST_SHOW_FILTERSORT ) ? sal_True : sal_False;
     343             : 
     344             :         // our strings
     345           1 :         m_sHelpText       = _rxInStream->readUTF( );
     346           1 :         m_sHelpURL        = _rxInStream->readUTF( );
     347           1 :         m_sDefaultControl = _rxInStream->readUTF( );
     348             : 
     349             :         // misc
     350           1 :         m_nBorder = _rxInStream->readShort();
     351           1 :         m_nDelay  = _rxInStream->readLong();
     352           1 :     }
     353             : 
     354             : 
     355        2271 :     void SAL_CALL ONavigationBarModel::getFastPropertyValue( Any& _rValue, sal_Int32 _nHandle ) const
     356             :     {
     357        2271 :         if ( isRegisteredProperty( _nHandle ) )
     358             :         {
     359         945 :             OPropertyContainerHelper::getFastPropertyValue( _rValue, _nHandle );
     360             :         }
     361        1326 :         else if ( isFontRelatedProperty( _nHandle ) )
     362             :         {
     363         648 :             FontControlModel::getFastPropertyValue( _rValue, _nHandle );
     364             :         }
     365             :         else
     366             :         {
     367         678 :             OControlModel::getFastPropertyValue( _rValue, _nHandle );
     368             :         }
     369        2271 :     }
     370             : 
     371             : 
     372         802 :     sal_Bool SAL_CALL ONavigationBarModel::convertFastPropertyValue( Any& _rConvertedValue, Any& _rOldValue,
     373             :         sal_Int32 _nHandle, const Any& _rValue ) throw( IllegalArgumentException )
     374             :     {
     375         802 :         sal_Bool bModified = sal_False;
     376             : 
     377         802 :         if ( isRegisteredProperty( _nHandle ) )
     378             :         {
     379         455 :             bModified = OPropertyContainerHelper::convertFastPropertyValue( _rConvertedValue, _rOldValue, _nHandle, _rValue );
     380             :         }
     381         347 :         else if ( isFontRelatedProperty( _nHandle ) )
     382             :         {
     383         147 :             bModified = FontControlModel::convertFastPropertyValue( _rConvertedValue, _rOldValue, _nHandle, _rValue );
     384             :         }
     385             :         else
     386             :         {
     387         200 :             bModified = OControlModel::convertFastPropertyValue( _rConvertedValue, _rOldValue, _nHandle, _rValue );
     388             :         }
     389             : 
     390         801 :         return bModified;
     391             :     }
     392             : 
     393             : 
     394         275 :     void SAL_CALL ONavigationBarModel::setFastPropertyValue_NoBroadcast( sal_Int32 _nHandle, const Any& _rValue ) throw ( Exception, std::exception )
     395             :     {
     396         275 :         if ( isRegisteredProperty( _nHandle ) )
     397             :         {
     398         127 :             OPropertyContainerHelper::setFastPropertyValue( _nHandle, _rValue );
     399             :         }
     400         148 :         else if ( isFontRelatedProperty( _nHandle ) )
     401             :         {
     402             :             FontControlModel::setFastPropertyValue_NoBroadcast_impl(
     403             :                     *this, &ONavigationBarModel::setDependentFastPropertyValue,
     404          81 :                     _nHandle, _rValue);
     405             :         }
     406             :         else
     407             :         {
     408          67 :             OControlModel::setFastPropertyValue_NoBroadcast( _nHandle, _rValue );
     409             :         }
     410         275 :     }
     411             : 
     412             : 
     413         124 :     Any ONavigationBarModel::getPropertyDefaultByHandle( sal_Int32 _nHandle ) const
     414             :     {
     415         124 :         Any aDefault;
     416             : 
     417         124 :         switch ( _nHandle )
     418             :         {
     419             :         case PROPERTY_ID_TABSTOP:
     420             :         case PROPERTY_ID_BACKGROUNDCOLOR:
     421             :             /* void */
     422           4 :             break;
     423             :         case PROPERTY_ID_WRITING_MODE:
     424             :         case PROPERTY_ID_CONTEXT_WRITING_MODE:
     425          20 :             aDefault <<= WritingMode2::CONTEXT;
     426          20 :             break;
     427             : 
     428             :         case PROPERTY_ID_ENABLED:
     429             :         case PROPERTY_ID_ENABLEVISIBLE:
     430             :         case PROPERTY_ID_SHOW_POSITION:
     431             :         case PROPERTY_ID_SHOW_NAVIGATION:
     432             :         case PROPERTY_ID_SHOW_RECORDACTIONS:
     433             :         case PROPERTY_ID_SHOW_FILTERSORT:
     434          60 :             aDefault <<= (sal_Bool)sal_True;
     435          60 :             break;
     436             : 
     437             :         case PROPERTY_ID_ICONSIZE:
     438          10 :             aDefault <<= (sal_Int16)0;
     439          10 :             break;
     440             : 
     441             :         case PROPERTY_ID_DEFAULTCONTROL:
     442          10 :             aDefault <<= OUString( "com.sun.star.form.control.NavigationToolBar" );
     443          10 :             break;
     444             : 
     445             :         case PROPERTY_ID_HELPTEXT:
     446             :         case PROPERTY_ID_HELPURL:
     447           0 :             aDefault <<= OUString();
     448           0 :             break;
     449             : 
     450             :         case PROPERTY_ID_BORDER:
     451          10 :             aDefault <<= (sal_Int16)0;
     452          10 :             break;
     453             : 
     454             :         case PROPERTY_ID_DELAY:
     455          10 :             aDefault <<= (sal_Int32)20;
     456          10 :             break;
     457             : 
     458             :         default:
     459           0 :             if ( isFontRelatedProperty( _nHandle ) )
     460           0 :                 aDefault = FontControlModel::getPropertyDefaultByHandle( _nHandle );
     461             :             else
     462           0 :                 aDefault = OControlModel::getPropertyDefaultByHandle( _nHandle );
     463             :         }
     464         124 :         return aDefault;
     465             :     }
     466             : 
     467             : 
     468          12 :     void ONavigationBarModel::describeFixedProperties( Sequence< Property >& _rProps ) const
     469             :     {
     470          12 :         BEGIN_DESCRIBE_PROPERTIES( 1, OControlModel )
     471          12 :             DECL_PROP2( TABINDEX,           sal_Int16,          BOUND, MAYBEDEFAULT );
     472             :         END_DESCRIBE_PROPERTIES();
     473             : 
     474             :         // properties which the OPropertyContainerHelper is responsible for
     475          12 :         Sequence< Property > aContainedProperties;
     476          12 :         describeProperties( aContainedProperties );
     477             : 
     478             :         // properties which the FontControlModel is responsible for
     479          24 :         Sequence< Property > aFontProperties;
     480          12 :         describeFontRelatedProperties( aFontProperties );
     481             : 
     482          24 :         _rProps = concatSequences(
     483             :             aContainedProperties,
     484             :             aFontProperties,
     485             :             _rProps
     486          24 :         );
     487          12 :     }
     488             : 
     489             : 
     490             : }   // namespace frm
     491             : 
     492             : 
     493             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10