LCOV - code coverage report
Current view: top level - libreoffice/sc/inc - appoptio.hxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 17 35 48.6 %
Date: 2012-12-27 Functions: 17 35 48.6 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
       2             : /*
       3             :  * This file is part of the LibreOffice project.
       4             :  *
       5             :  * This Source Code Form is subject to the terms of the Mozilla Public
       6             :  * License, v. 2.0. If a copy of the MPL was not distributed with this
       7             :  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
       8             :  *
       9             :  * This file incorporates work covered by the following license notice:
      10             :  *
      11             :  *   Licensed to the Apache Software Foundation (ASF) under one or more
      12             :  *   contributor license agreements. See the NOTICE file distributed
      13             :  *   with this work for additional information regarding copyright
      14             :  *   ownership. The ASF licenses this file to you under the Apache
      15             :  *   License, Version 2.0 (the "License"); you may not use this file
      16             :  *   except in compliance with the License. You may obtain a copy of
      17             :  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
      18             :  */
      19             : 
      20             : #ifndef SC_APPOPTIO_HXX
      21             : #define SC_APPOPTIO_HXX
      22             : 
      23             : #include <vcl/field.hxx>
      24             : #include <sfx2/zoomitem.hxx>
      25             : #include <unotools/configitem.hxx>
      26             : #include "scdllapi.h"
      27             : #include "scmod.hxx"
      28             : #include "global.hxx"
      29             : #include "optutil.hxx"
      30             : 
      31             : class SC_DLLPUBLIC ScAppOptions
      32             : {
      33             : public:
      34             :                 ScAppOptions();
      35             :                 ScAppOptions( const ScAppOptions& rCpy );
      36             :                 ~ScAppOptions();
      37             : 
      38             :     void        SetDefaults();
      39             : 
      40           5 :     void        SetAppMetric( FieldUnit eUnit ) { eMetric = eUnit;      }
      41          13 :     FieldUnit   GetAppMetric() const            { return eMetric;       }
      42           5 :     void        SetZoom( sal_uInt16 nNew )          { nZoom = nNew;         }
      43           0 :     sal_uInt16      GetZoom() const                 { return nZoom;         }
      44           5 :     void        SetZoomType( SvxZoomType eNew ) { eZoomType = eNew;     }
      45           0 :     SvxZoomType GetZoomType() const             { return eZoomType;     }
      46           5 :     void        SetSynchronizeZoom( sal_Bool bNew ) { bSynchronizeZoom = bNew; }
      47           0 :     sal_Bool        GetSynchronizeZoom() const      { return bSynchronizeZoom; }
      48           0 :     sal_uInt16      GetLRUFuncListCount() const     { return nLRUFuncCount; }
      49           0 :     sal_uInt16*     GetLRUFuncList() const          { return pLRUList;      }
      50             :     void        SetLRUFuncList( const sal_uInt16* pList,
      51             :                                 const sal_uInt16  nCount );
      52           5 :     void        SetStatusFunc( sal_uInt16 nNew )    { nStatusFunc = nNew;   }
      53           0 :     sal_uInt16      GetStatusFunc() const           { return nStatusFunc;   }
      54           5 :     void        SetAutoComplete( sal_Bool bNew )    { bAutoComplete = bNew; }
      55           0 :     sal_Bool        GetAutoComplete() const         { return bAutoComplete; }
      56           5 :     void        SetDetectiveAuto( sal_Bool bNew )   { bDetectiveAuto = bNew; }
      57           0 :     sal_Bool        GetDetectiveAuto() const        { return bDetectiveAuto; }
      58             : 
      59           5 :     void        SetTrackContentColor(sal_uInt32 nNew) { nTrackContentColor = nNew; }
      60           0 :     sal_uInt32  GetTrackContentColor() const     { return nTrackContentColor; }
      61           5 :     void        SetTrackInsertColor(sal_uInt32 nNew)  { nTrackInsertColor = nNew;  }
      62           0 :     sal_uInt32  GetTrackInsertColor() const      { return nTrackInsertColor;  }
      63           5 :     void        SetTrackDeleteColor(sal_uInt32 nNew)  { nTrackDeleteColor = nNew;  }
      64           0 :     sal_uInt32  GetTrackDeleteColor() const      { return nTrackDeleteColor;  }
      65           5 :     void        SetTrackMoveColor(sal_uInt32 nNew)    { nTrackMoveColor = nNew;    }
      66           0 :     sal_uInt32  GetTrackMoveColor() const        { return nTrackMoveColor;    }
      67             : 
      68           0 :     ScLkUpdMode GetLinkMode() const             { return eLinkMode ;}
      69           5 :     void        SetLinkMode( ScLkUpdMode nSet ) {   eLinkMode  = nSet;}
      70             : 
      71           5 :     void        SetDefaultObjectSizeWidth(sal_Int32 nNew)   { nDefaultObjectSizeWidth = nNew; }
      72           0 :     sal_Int32       GetDefaultObjectSizeWidth() const       { return nDefaultObjectSizeWidth; }
      73           5 :     void        SetDefaultObjectSizeHeight(sal_Int32 nNew)  { nDefaultObjectSizeHeight = nNew; }
      74           0 :     sal_Int32       GetDefaultObjectSizeHeight() const      { return nDefaultObjectSizeHeight; }
      75             : 
      76           5 :     void        SetShowSharedDocumentWarning( sal_Bool bNew )   { mbShowSharedDocumentWarning = bNew; }
      77           0 :     sal_Bool        GetShowSharedDocumentWarning() const        { return mbShowSharedDocumentWarning; }
      78           0 :     ScOptionsUtil::KeyBindingType GetKeyBindingType() const { return meKeyBindingType; }
      79           5 :     void        SetKeyBindingType( ScOptionsUtil::KeyBindingType e ) { meKeyBindingType = e; }
      80             : 
      81             :     const ScAppOptions& operator=   ( const ScAppOptions& rOpt );
      82             : 
      83             : private:
      84             :     FieldUnit   eMetric;
      85             :     sal_uInt16      nLRUFuncCount;
      86             :     sal_uInt16*     pLRUList;
      87             :     SvxZoomType eZoomType;
      88             :     sal_uInt16      nZoom;
      89             :     sal_Bool        bSynchronizeZoom;
      90             :     sal_uInt16      nStatusFunc;
      91             :     sal_Bool        bAutoComplete;
      92             :     sal_Bool        bDetectiveAuto;
      93             :     sal_uInt32  nTrackContentColor;
      94             :     sal_uInt32  nTrackInsertColor;
      95             :     sal_uInt32  nTrackDeleteColor;
      96             :     sal_uInt32  nTrackMoveColor;
      97             :     ScLkUpdMode eLinkMode;
      98             :     sal_Int32       nDefaultObjectSizeWidth;
      99             :     sal_Int32       nDefaultObjectSizeHeight;
     100             :     sal_Bool        mbShowSharedDocumentWarning;
     101             :     ScOptionsUtil::KeyBindingType meKeyBindingType;
     102             : };
     103             : 
     104             : 
     105             : //==================================================================
     106             : //  Config Item containing app options
     107             : //==================================================================
     108             : 
     109           0 : class ScAppCfg : public ScAppOptions
     110             : {
     111             :     //  spread about 5 config paths
     112             :     //! split ScAppOptions into different classes
     113             : 
     114             :     ScLinkConfigItem    aLayoutItem;
     115             :     ScLinkConfigItem    aInputItem;
     116             :     ScLinkConfigItem    aRevisionItem;
     117             :     ScLinkConfigItem    aContentItem;
     118             :     ScLinkConfigItem    aSortListItem;
     119             :     ScLinkConfigItem    aMiscItem;
     120             :     ScLinkConfigItem    aCompatItem;
     121             : 
     122             :     DECL_LINK( LayoutCommitHdl, void* );
     123             :     DECL_LINK( InputCommitHdl, void* );
     124             :     DECL_LINK( RevisionCommitHdl, void* );
     125             :     DECL_LINK( ContentCommitHdl, void* );
     126             :     DECL_LINK( SortListCommitHdl, void* );
     127             :     DECL_LINK( MiscCommitHdl, void* );
     128             :     DECL_LINK( CompatCommitHdl, void* );
     129             : 
     130             :     com::sun::star::uno::Sequence<rtl::OUString> GetLayoutPropertyNames();
     131             :     com::sun::star::uno::Sequence<rtl::OUString> GetInputPropertyNames();
     132             :     com::sun::star::uno::Sequence<rtl::OUString> GetRevisionPropertyNames();
     133             :     com::sun::star::uno::Sequence<rtl::OUString> GetContentPropertyNames();
     134             :     com::sun::star::uno::Sequence<rtl::OUString> GetSortListPropertyNames();
     135             :     com::sun::star::uno::Sequence<rtl::OUString> GetMiscPropertyNames();
     136             :     com::sun::star::uno::Sequence<rtl::OUString> GetCompatPropertyNames();
     137             : 
     138             : public:
     139             :             ScAppCfg();
     140             : 
     141             :     void    SetOptions( const ScAppOptions& rNew );
     142             :     void    OptionsChanged();   // after direct access to ScAppOptions base class
     143             : };
     144             : 
     145             : #endif
     146             : 
     147             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10