LCOV - code coverage report
Current view: top level - include/svx - hlnkitem.hxx (source / functions) Hit Total Coverage
Test: commit 10e77ab3ff6f4314137acd6e2702a6e5c1ce1fae Lines: 0 16 0.0 %
Date: 2014-11-03 Functions: 0 16 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_SVX_HLNKITEM_HXX
      20             : #define INCLUDED_SVX_HLNKITEM_HXX
      21             : 
      22             : #include <rtl/ustring.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             :     OUString sName;
      43             :     OUString sURL;
      44             :     OUString sTarget;
      45             :     SvxLinkInsertMode eType;
      46             : 
      47             :     OUString sIntName;
      48             :     SvxMacroTableDtor*  pMacroTable;
      49             : 
      50             :     sal_uInt16 nMacroEvents;
      51             : 
      52             : public:
      53             :     TYPEINFO_OVERRIDE();
      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, const OUString& rName, const OUString& rURL,
      59             :                                     const OUString& rTarget, const OUString& 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 bool             operator==( const SfxPoolItem& ) const SAL_OVERRIDE;
      68             :     virtual SfxPoolItem*     Clone( SfxItemPool *pPool = 0 ) const SAL_OVERRIDE;
      69             :     virtual bool             QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const SAL_OVERRIDE;
      70             :     virtual bool             PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) SAL_OVERRIDE;
      71             : 
      72           0 :     const   OUString& GetName() const { return sName; }
      73           0 :     void    SetName(const OUString& rName) { sName = rName; }
      74             : 
      75           0 :     const   OUString& GetURL() const { return sURL; }
      76           0 :     void    SetURL(const OUString& rURL) { sURL = rURL; }
      77             : 
      78           0 :     const   OUString& GetIntName () const { return sIntName; }
      79           0 :     void    SetIntName(const OUString& rIntName) { sIntName = rIntName; }
      80             : 
      81           0 :     const   OUString& GetTargetFrame() const { return sTarget; }
      82           0 :     void    SetTargetFrame(const OUString& rTarget) { sTarget = rTarget; }
      83             : 
      84           0 :     SvxLinkInsertMode GetInsertMode() const { return eType; }
      85           0 :     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           0 :     void SetMacroEvents (const sal_uInt16 nEvents) { nMacroEvents = nEvents; }
      93           0 :     sal_uInt16 GetMacroEvents() const { return nMacroEvents; }
      94             : 
      95             :     virtual SvStream&           Store( SvStream &, sal_uInt16 nItemVersion ) const SAL_OVERRIDE;
      96             :     virtual SfxPoolItem*        Create( SvStream &, sal_uInt16 nVer ) const SAL_OVERRIDE;
      97             : 
      98             : };
      99             : 
     100             : #endif
     101             : 
     102             : 
     103             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10