LCOV - code coverage report
Current view: top level - sc/inc - appoptio.hxx (source / functions) Hit Total Coverage
Test: commit e02a6cb2c3e2b23b203b422e4e0680877f232636 Lines: 0 35 0.0 %
Date: 2014-04-14 Functions: 0 35 0.0 %
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           0 :     void        SetAppMetric( FieldUnit eUnit ) { eMetric = eUnit;      }
      41           0 :     FieldUnit   GetAppMetric() const            { return eMetric;       }
      42           0 :     void        SetZoom( sal_uInt16 nNew )          { nZoom = nNew;         }
      43           0 :     sal_uInt16      GetZoom() const                 { return nZoom;         }
      44           0 :     void        SetZoomType( SvxZoomType eNew ) { eZoomType = eNew;     }
      45           0 :     SvxZoomType GetZoomType() const             { return eZoomType;     }
      46           0 :     void        SetSynchronizeZoom( bool bNew ) { bSynchronizeZoom = bNew; }
      47           0 :     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           0 :     void        SetStatusFunc( sal_uInt16 nNew )    { nStatusFunc = nNew;   }
      53           0 :     sal_uInt16      GetStatusFunc() const           { return nStatusFunc;   }
      54           0 :     void        SetAutoComplete( bool bNew )    { bAutoComplete = bNew; }
      55           0 :     bool        GetAutoComplete() const         { return bAutoComplete; }
      56           0 :     void        SetDetectiveAuto( bool bNew )   { bDetectiveAuto = bNew; }
      57           0 :     bool        GetDetectiveAuto() const        { return bDetectiveAuto; }
      58             : 
      59           0 :     void        SetTrackContentColor(sal_uInt32 nNew) { nTrackContentColor = nNew; }
      60           0 :     sal_uInt32  GetTrackContentColor() const     { return nTrackContentColor; }
      61           0 :     void        SetTrackInsertColor(sal_uInt32 nNew)  { nTrackInsertColor = nNew;  }
      62           0 :     sal_uInt32  GetTrackInsertColor() const      { return nTrackInsertColor;  }
      63           0 :     void        SetTrackDeleteColor(sal_uInt32 nNew)  { nTrackDeleteColor = nNew;  }
      64           0 :     sal_uInt32  GetTrackDeleteColor() const      { return nTrackDeleteColor;  }
      65           0 :     void        SetTrackMoveColor(sal_uInt32 nNew)    { nTrackMoveColor = nNew;    }
      66           0 :     sal_uInt32  GetTrackMoveColor() const        { return nTrackMoveColor;    }
      67             : 
      68           0 :     ScLkUpdMode GetLinkMode() const             { return eLinkMode ;}
      69           0 :     void        SetLinkMode( ScLkUpdMode nSet ) {   eLinkMode  = nSet;}
      70             : 
      71           0 :     void        SetDefaultObjectSizeWidth(sal_Int32 nNew)   { nDefaultObjectSizeWidth = nNew; }
      72           0 :     sal_Int32       GetDefaultObjectSizeWidth() const       { return nDefaultObjectSizeWidth; }
      73           0 :     void        SetDefaultObjectSizeHeight(sal_Int32 nNew)  { nDefaultObjectSizeHeight = nNew; }
      74           0 :     sal_Int32       GetDefaultObjectSizeHeight() const      { return nDefaultObjectSizeHeight; }
      75             : 
      76           0 :     void        SetShowSharedDocumentWarning( bool bNew )   { mbShowSharedDocumentWarning = bNew; }
      77           0 :     bool        GetShowSharedDocumentWarning() const        { return mbShowSharedDocumentWarning; }
      78           0 :     ScOptionsUtil::KeyBindingType GetKeyBindingType() const { return meKeyBindingType; }
      79           0 :     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             :     bool            bSynchronizeZoom;
      90             :     sal_uInt16      nStatusFunc;
      91             :     bool            bAutoComplete;
      92             :     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             :     bool            mbShowSharedDocumentWarning;
     101             :     ScOptionsUtil::KeyBindingType meKeyBindingType;
     102             : };
     103             : 
     104             : //  Config Item containing app options
     105             : 
     106           0 : class ScAppCfg : public ScAppOptions
     107             : {
     108             :     //  spread about 5 config paths
     109             :     //! split ScAppOptions into different classes
     110             : 
     111             :     ScLinkConfigItem    aLayoutItem;
     112             :     ScLinkConfigItem    aInputItem;
     113             :     ScLinkConfigItem    aRevisionItem;
     114             :     ScLinkConfigItem    aContentItem;
     115             :     ScLinkConfigItem    aSortListItem;
     116             :     ScLinkConfigItem    aMiscItem;
     117             :     ScLinkConfigItem    aCompatItem;
     118             : 
     119             :     DECL_LINK( LayoutCommitHdl, void* );
     120             :     DECL_LINK( InputCommitHdl, void* );
     121             :     DECL_LINK( RevisionCommitHdl, void* );
     122             :     DECL_LINK( ContentCommitHdl, void* );
     123             :     DECL_LINK( SortListCommitHdl, void* );
     124             :     DECL_LINK( MiscCommitHdl, void* );
     125             :     DECL_LINK( CompatCommitHdl, void* );
     126             : 
     127             :     com::sun::star::uno::Sequence<OUString> GetLayoutPropertyNames();
     128             :     com::sun::star::uno::Sequence<OUString> GetInputPropertyNames();
     129             :     com::sun::star::uno::Sequence<OUString> GetRevisionPropertyNames();
     130             :     com::sun::star::uno::Sequence<OUString> GetContentPropertyNames();
     131             :     com::sun::star::uno::Sequence<OUString> GetSortListPropertyNames();
     132             :     com::sun::star::uno::Sequence<OUString> GetMiscPropertyNames();
     133             :     com::sun::star::uno::Sequence<OUString> GetCompatPropertyNames();
     134             : 
     135             : public:
     136             :             ScAppCfg();
     137             : 
     138             :     void    SetOptions( const ScAppOptions& rNew );
     139             :     void    OptionsChanged();   // after direct access to ScAppOptions base class
     140             : };
     141             : 
     142             : #endif
     143             : 
     144             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10