LCOV - code coverage report
Current view: top level - libreoffice/svx/inc/svx - hlnkitem.hxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 0 4 0.0 %
Date: 2012-12-17 Functions: 0 4 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 _SVX_HLNKITEM_HXX
      20             : #define _SVX_HLNKITEM_HXX
      21             : 
      22             : #include <tools/string.hxx>
      23             : #include <svl/poolitem.hxx>
      24             : #include <sfx2/sfxsids.hrc>
      25             : #include <svl/macitem.hxx>
      26             : #include "svx/svxdllapi.h"
      27             : 
      28             : #define HYPERDLG_EVENT_MOUSEOVER_OBJECT     0x0001
      29             : #define HYPERDLG_EVENT_MOUSECLICK_OBJECT    0x0002
      30             : #define HYPERDLG_EVENT_MOUSEOUT_OBJECT      0x0004
      31             : 
      32             : enum SvxLinkInsertMode
      33             : {
      34             :     HLINK_DEFAULT,
      35             :     HLINK_FIELD,
      36             :     HLINK_BUTTON,
      37             :     HLINK_HTMLMODE = 0x0080
      38             : };
      39             : 
      40             : class SVX_DLLPUBLIC SvxHyperlinkItem : public SfxPoolItem
      41             : {
      42             :     String sName;
      43             :     String sURL;
      44             :     String sTarget;
      45             :     SvxLinkInsertMode eType;
      46             : 
      47             :     String sIntName;
      48             :     SvxMacroTableDtor*  pMacroTable;
      49             : 
      50             :     sal_uInt16 nMacroEvents;
      51             : 
      52             : public:
      53             :     TYPEINFO();
      54             : 
      55           0 :     SvxHyperlinkItem( sal_uInt16 _nWhich = SID_HYPERLINK_GETLINK ):
      56           0 :                 SfxPoolItem(_nWhich), pMacroTable(NULL) { eType = HLINK_DEFAULT; nMacroEvents=0; };
      57             :     SvxHyperlinkItem( const SvxHyperlinkItem& rHyperlinkItem );
      58             :     SvxHyperlinkItem( sal_uInt16 nWhich, String& rName, String& rURL,
      59             :                                     String& rTarget, String& rIntName,
      60             :                                     SvxLinkInsertMode eTyp = HLINK_FIELD,
      61             :                                     sal_uInt16 nEvents = 0,
      62             :                                     SvxMacroTableDtor *pMacroTbl =NULL );
      63           0 :     virtual ~SvxHyperlinkItem () { delete pMacroTable; }
      64             : 
      65             :     inline SvxHyperlinkItem& operator=( const SvxHyperlinkItem &rItem );
      66             : 
      67             :     virtual int              operator==( const SfxPoolItem& ) const;
      68             :     virtual SfxPoolItem*     Clone( SfxItemPool *pPool = 0 ) const;
      69             :     virtual bool             QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const;
      70             :     virtual bool             PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 );
      71             : 
      72             :     const   String& GetName() const { return sName; }
      73             :     void    SetName(const String& rName) { sName = rName; }
      74             : 
      75             :     const   String& GetURL() const { return sURL; }
      76             :     void    SetURL(const String& rURL) { sURL = rURL; }
      77             : 
      78             :     const   String& GetIntName () const { return sIntName; }
      79             :     void    SetIntName(const String& rIntName) { sIntName = rIntName; }
      80             : 
      81             :     const   String& GetTargetFrame() const { return sTarget; }
      82             :     void    SetTargetFrame(const String& rTarget) { sTarget = rTarget; }
      83             : 
      84             :     SvxLinkInsertMode GetInsertMode() const { return eType; }
      85             :     void    SetInsertMode( SvxLinkInsertMode eNew ) { eType = eNew; }
      86             : 
      87             :     void SetMacro( sal_uInt16 nEvent, const SvxMacro& rMacro );
      88             : 
      89             :     void SetMacroTable( const SvxMacroTableDtor& rTbl );
      90           0 :     const SvxMacroTableDtor* GetMacroTbl() const    { return pMacroTable; }
      91             : 
      92             :     void SetMacroEvents (const sal_uInt16 nEvents) { nMacroEvents = nEvents; }
      93             :     sal_uInt16 GetMacroEvents() const { return nMacroEvents; }
      94             : 
      95             :     virtual SvStream&           Store( SvStream &, sal_uInt16 nItemVersion ) const;
      96             :     virtual SfxPoolItem*        Create( SvStream &, sal_uInt16 nVer ) const;
      97             : 
      98             : };
      99             : 
     100             : #endif
     101             : 
     102             : 
     103             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10