LCOV - code coverage report
Current view: top level - usr/local/src/libreoffice/sw/inc - IDocumentFieldsAccess.hxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 2 2 100.0 %
Date: 2013-07-09 Functions: 2 3 66.7 %
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 IDOCUMENTFIELDSACCESS_HXX_INCLUDED
      21             : #define IDOCUMENTFIELDSACCESS_HXX_INCLUDED
      22             : 
      23             : #include <sal/types.h>
      24             : #include <tools/solar.h>
      25             : 
      26             : class SwFldTypes;
      27             : class SwFieldType;
      28             : class SfxPoolItem;
      29             : struct SwPosition;
      30             : class SwDocUpdtFld;
      31             : class SwCalc;
      32             : class SwTxtFld;
      33             : class SwField;
      34             : class SwMsgPoolItem;
      35             : class DateTime;
      36             : class _SetGetExpFld;
      37             : struct SwHash;
      38             : class String;
      39             : class SwNode;
      40             : 
      41             : namespace com { namespace sun { namespace star { namespace uno { class Any; } } } }
      42             : 
      43             :  /** Document fields related interfaces
      44             :  */
      45         898 :  class IDocumentFieldsAccess
      46             :  {
      47             :  public:
      48             :     virtual const SwFldTypes *GetFldTypes() const = 0;
      49             : 
      50             :     virtual SwFieldType *InsertFldType(const SwFieldType &) = 0;
      51             : 
      52             :     virtual SwFieldType *GetSysFldType( const sal_uInt16 eWhich ) const = 0;
      53             : 
      54             :     virtual SwFieldType* GetFldType(sal_uInt16 nResId, const String& rName, bool bDbFieldMatching) const = 0;
      55             : 
      56             :     virtual void RemoveFldType(sal_uInt16 nFld) = 0;
      57             : 
      58             :     virtual void UpdateFlds( SfxPoolItem* pNewHt, bool bCloseDB) = 0;
      59             : 
      60             :     virtual void InsDeletedFldType(SwFieldType &) = 0;
      61             : 
      62             :     /**
      63             :        Puts a value into a field at a certain position.
      64             : 
      65             :        A missing field at the given position leads to a failure.
      66             : 
      67             :        @param rPosition        position of the field
      68             :        @param rVal             the value
      69             :        @param nMId
      70             : 
      71             :        @retval sal_True            putting of value was successful
      72             :        @retval sal_False           else
      73             :     */
      74             :     virtual bool PutValueToField(const SwPosition & rPos, const com::sun::star::uno::Any& rVal, sal_uInt16 nWhich) = 0;
      75             : 
      76             :     // Call update of expression fields. All expressions are re-evaluated.
      77             : 
      78             :     /** Updates a field.
      79             : 
      80             :         @param rDstFmtFld field to update
      81             :         @param rSrcFld field containing the new values
      82             :         @param pMsgHnt
      83             :         @param bUpdateTblFlds TRUE: update table fields, too.
      84             : 
      85             :         @retval sal_True             update was successful
      86             :         @retval sal_False            else
      87             :     */
      88             :     virtual bool UpdateFld(SwTxtFld * rDstFmtFld, SwField & rSrcFld, SwMsgPoolItem * pMsgHnt, bool bUpdateTblFlds) = 0;
      89             : 
      90             :     virtual void UpdateRefFlds(SfxPoolItem* pHt) = 0;
      91             : 
      92             :     virtual void UpdateTblFlds(SfxPoolItem* pHt) = 0;
      93             : 
      94             :     virtual void UpdateExpFlds(SwTxtFld* pFld, bool bUpdateRefFlds) = 0;
      95             : 
      96             :     virtual void UpdateUsrFlds() = 0;
      97             : 
      98             :     virtual void UpdatePageFlds(SfxPoolItem*) = 0;
      99             : 
     100             :     virtual void LockExpFlds() = 0;
     101             : 
     102             :     virtual void UnlockExpFlds() = 0;
     103             : 
     104             :     virtual bool IsExpFldsLocked() const = 0;
     105             : 
     106             :     virtual SwDocUpdtFld& GetUpdtFlds() const = 0;
     107             : 
     108             :     /*  @@@MAINTAINABILITY-HORROR@@@
     109             :         SwNode (see parameter pChk) is (?) part of the private
     110             :         data structure of SwDoc and should not be exposed
     111             :     */
     112             :     virtual bool SetFieldsDirty(bool b, const SwNode* pChk, sal_uLong nLen) = 0;
     113             : 
     114             :     virtual void SetFixFields(bool bOnlyTimeDate, const DateTime* pNewDateTime) = 0;
     115             : 
     116             : 
     117             :     // In Calculator set all SetExpression fields that are valid up to the indicated position
     118             :     // (Node [ + ::com::sun::star::ucb::Content]).
     119             :     // A generated list of all fields may be passed along too
     120             :     // (if the addreess != 0 and the pointer == 0 a new list will be returned).
     121             :     virtual void FldsToCalc(SwCalc& rCalc, sal_uLong nLastNd, sal_uInt16 nLastCnt) = 0;
     122             : 
     123             :     virtual void FldsToCalc(SwCalc& rCalc, const _SetGetExpFld& rToThisFld) = 0;
     124             : 
     125             :     virtual void FldsToExpand(SwHash**& ppTbl, sal_uInt16& rTblSize, const _SetGetExpFld& rToThisFld) = 0;
     126             : 
     127             :     virtual bool IsNewFldLst() const = 0;
     128             : 
     129             :     virtual void SetNewFldLst( bool bFlag) = 0;
     130             : 
     131             :     virtual void InsDelFldInFldLst(bool bIns, const SwTxtFld& rFld) = 0;
     132             : 
     133             : protected:
     134         895 :     virtual ~IDocumentFieldsAccess() {};
     135             :  };
     136             : 
     137             :  #endif // IDOCUMENTLINKSADMINISTRATION_HXX_INCLUDED
     138             : 
     139             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10