LCOV - code coverage report
Current view: top level - libreoffice/sw/inc - fmtinfmt.hxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 6 15 40.0 %
Date: 2012-12-27 Functions: 6 15 40.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             : #ifndef _FMTINFMT_HXX
      20             : #define _FMTINFMT_HXX
      21             : 
      22             : #include <tools/string.hxx>
      23             : #include <svl/poolitem.hxx>
      24             : #include "swdllapi.h"
      25             : 
      26             : class SvxMacro;
      27             : class SvxMacroTableDtor;
      28             : class SwTxtINetFmt;
      29             : class IntlWrapper;
      30             : 
      31             : // ATT_INETFMT
      32             : 
      33             : class SW_DLLPUBLIC SwFmtINetFmt: public SfxPoolItem
      34             : {
      35             :     friend class SwTxtINetFmt;
      36             : 
      37             :     String aURL;                    ///< URL.
      38             :     String aTargetFrame;            ///< Target frame for URL.
      39             :     String aINetFmt;
      40             :     String aVisitedFmt;
      41             :     String aName;                   ///< Name of the link.
      42             :     SvxMacroTableDtor* pMacroTbl;
      43             :     SwTxtINetFmt* pTxtAttr;         ///< My TextAttribute.
      44             :     sal_uInt16 nINetId;
      45             :     sal_uInt16 nVisitedId;
      46             : public:
      47             :     SwFmtINetFmt( const String& rURL, const String& rTarget );
      48             :     SwFmtINetFmt( const SwFmtINetFmt& rAttr );
      49             :     SwFmtINetFmt();                     ///< For TypeInfo.
      50             :     virtual ~SwFmtINetFmt();
      51             : 
      52             :     TYPEINFO();
      53             : 
      54             :     /// "Pure virtual methods" of SfxPoolItem.
      55             :     virtual int             operator==( const SfxPoolItem& ) const;
      56             :     virtual SfxPoolItem*    Clone( SfxItemPool* pPool = 0 ) const;
      57             :     virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
      58             :                                     SfxMapUnit eCoreMetric,
      59             :                                     SfxMapUnit ePresMetric,
      60             :                                     String &rText,
      61             :                                     const IntlWrapper* pIntl = 0 ) const;
      62             : 
      63             :     virtual bool QueryValue( com::sun::star::uno::Any& rVal,
      64             :                                         sal_uInt8 nMemberId = 0 ) const;
      65             :     virtual bool PutValue( const com::sun::star::uno::Any& rVal,
      66             :                                         sal_uInt8 nMemberId = 0 );
      67             : 
      68             : 
      69           6 :     const SwTxtINetFmt* GetTxtINetFmt() const   { return pTxtAttr; }
      70         104 :     SwTxtINetFmt* GetTxtINetFmt()               { return pTxtAttr; }
      71             : 
      72         218 :     const String& GetValue() const          { return aURL; }
      73             : 
      74           0 :     const String& GetName() const           { return aName; }
      75           0 :     void SetName( const String& rNm )       { aName = rNm; }
      76             : 
      77           3 :     const String& GetTargetFrame() const    { return aTargetFrame; }
      78             : 
      79         107 :     const String& GetINetFmt() const        { return aINetFmt; }
      80           0 :     void SetINetFmt( const String& rNm )    { aINetFmt = rNm; }
      81             : 
      82           0 :     const String& GetVisitedFmt() const     { return aVisitedFmt; }
      83           0 :     void SetVisitedFmt( const String& rNm ) { aVisitedFmt = rNm; }
      84             : 
      85           0 :     sal_uInt16 GetINetFmtId() const             { return nINetId; }
      86           0 :     void SetINetFmtId( sal_uInt16 nNew )        { nINetId = nNew; }
      87             : 
      88           0 :     sal_uInt16 GetVisitedFmtId() const          { return nVisitedId; }
      89           0 :     void SetVisitedFmtId( sal_uInt16 nNew )     { nVisitedId = nNew; }
      90             : 
      91             :     /// Set a new MacroTable or clear the current one.
      92             :     void SetMacroTbl( const SvxMacroTableDtor* pTbl = 0 );
      93          49 :     const SvxMacroTableDtor* GetMacroTbl() const    { return pMacroTbl; }
      94             : 
      95             :     /// Macro getter and setter.
      96             :     void SetMacro( sal_uInt16 nEvent, const SvxMacro& rMacro );
      97             :     const SvxMacro* GetMacro( sal_uInt16 nEvent ) const;
      98             : };
      99             : 
     100             : 
     101             : #endif
     102             : 
     103             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10