LCOV - code coverage report
Current view: top level - sw/inc - fmtinfmt.hxx (source / functions) Hit Total Coverage
Test: commit e02a6cb2c3e2b23b203b422e4e0680877f232636 Lines: 0 31 0.0 %
Date: 2014-04-14 Functions: 0 13 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             : #ifndef INCLUDED_SW_INC_FMTINFMT_HXX
      20             : #define INCLUDED_SW_INC_FMTINFMT_HXX
      21             : 
      22             : #include <svl/poolitem.hxx>
      23             : #include "swdllapi.h"
      24             : 
      25             : class SvxMacro;
      26             : class SvxMacroTableDtor;
      27             : class SwTxtINetFmt;
      28             : class IntlWrapper;
      29             : 
      30             : // ATT_INETFMT
      31             : 
      32             : class SW_DLLPUBLIC SwFmtINetFmt: public SfxPoolItem
      33             : {
      34             :     friend class SwTxtINetFmt;
      35             : 
      36             :     OUString msURL;                  ///< URL.
      37             :     OUString msTargetFrame;          ///< Target frame for URL.
      38             :     OUString msINetFmtName;
      39             :     OUString msVisitedFmtName;
      40             :     OUString msHyperlinkName;        ///< Name of the link.
      41             :     SvxMacroTableDtor* mpMacroTbl;
      42             :     SwTxtINetFmt* mpTxtAttr;         ///< My TextAttribute.
      43             :     sal_uInt16 mnINetFmtId;
      44             :     sal_uInt16 mnVisitedFmtId;
      45             : public:
      46             :     SwFmtINetFmt( const OUString& rURL, const OUString& rTarget );
      47             :     SwFmtINetFmt( const SwFmtINetFmt& rAttr );
      48             :     SwFmtINetFmt();                     ///< For TypeInfo.
      49             :     virtual ~SwFmtINetFmt();
      50             : 
      51             :     TYPEINFO_OVERRIDE();
      52             : 
      53             :     /// "Pure virtual methods" of SfxPoolItem.
      54             :     virtual bool            operator==( const SfxPoolItem& ) const SAL_OVERRIDE;
      55             :     virtual SfxPoolItem*    Clone( SfxItemPool* pPool = 0 ) const SAL_OVERRIDE;
      56             :     virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
      57             :                                     SfxMapUnit eCoreMetric,
      58             :                                     SfxMapUnit ePresMetric,
      59             :                                     OUString &rText,
      60             :                                     const IntlWrapper* pIntl = 0 ) const SAL_OVERRIDE;
      61             : 
      62             :     virtual bool QueryValue( com::sun::star::uno::Any& rVal,
      63             :                                         sal_uInt8 nMemberId = 0 ) const SAL_OVERRIDE;
      64             :     virtual bool PutValue( const com::sun::star::uno::Any& rVal,
      65             :                                         sal_uInt8 nMemberId = 0 ) SAL_OVERRIDE;
      66             : 
      67           0 :     const SwTxtINetFmt* GetTxtINetFmt() const
      68             :     {
      69           0 :         return mpTxtAttr;
      70             :     }
      71           0 :     SwTxtINetFmt* GetTxtINetFmt()
      72             :     {
      73           0 :         return mpTxtAttr;
      74             :     }
      75             : 
      76           0 :     const OUString& GetValue() const
      77             :     {
      78           0 :         return msURL;
      79             :     }
      80             : 
      81           0 :     const OUString& GetName() const
      82             :     {
      83           0 :         return msHyperlinkName;
      84             :     }
      85           0 :     void SetName( const OUString& rNm )
      86             :     {
      87           0 :         msHyperlinkName = rNm;
      88           0 :     }
      89             : 
      90           0 :     const OUString& GetTargetFrame() const
      91             :     {
      92           0 :         return msTargetFrame;
      93             :     }
      94             : 
      95           0 :     void SetINetFmtAndId(
      96             :             const OUString& rNm,
      97             :             const sal_uInt16 nId )
      98             :     {
      99           0 :         msINetFmtName = rNm;
     100           0 :         mnINetFmtId = nId;
     101           0 :     }
     102             : 
     103           0 :     const OUString& GetINetFmt() const
     104             :     {
     105           0 :         return msINetFmtName;
     106             :     }
     107             : 
     108           0 :     sal_uInt16 GetINetFmtId() const
     109             :     {
     110           0 :         return mnINetFmtId;
     111             :     }
     112             : 
     113           0 :     void SetVisitedFmtAndId(
     114             :             const OUString& rNm,
     115             :             const sal_uInt16 nId )
     116             :     {
     117           0 :         msVisitedFmtName = rNm;
     118           0 :         mnVisitedFmtId = nId;
     119           0 :     }
     120             : 
     121           0 :     const OUString& GetVisitedFmt() const
     122             :     {
     123           0 :         return msVisitedFmtName;
     124             :     }
     125             : 
     126           0 :     sal_uInt16 GetVisitedFmtId() const
     127             :     {
     128           0 :         return mnVisitedFmtId;
     129             :     }
     130             : 
     131             :     /// Set a new MacroTable or clear the current one.
     132             :     void SetMacroTbl( const SvxMacroTableDtor* pTbl = 0 );
     133           0 :     const SvxMacroTableDtor* GetMacroTbl() const
     134             :     {
     135           0 :         return mpMacroTbl;
     136             :     }
     137             : 
     138             :     /// Macro getter and setter.
     139             :     void SetMacro(
     140             :             sal_uInt16 nEvent,
     141             :             const SvxMacro& rMacro );
     142             :     const SvxMacro* GetMacro( sal_uInt16 nEvent ) const;
     143             : };
     144             : 
     145             : #endif
     146             : 
     147             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10