LCOV - code coverage report
Current view: top level - libreoffice/sw/inc - fmturl.hxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 0 12 0.0 %
Date: 2012-12-27 Functions: 0 10 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 _FMTURL_HXX
      20             : #define _FMTURL_HXX
      21             : 
      22             : #include <svl/poolitem.hxx>
      23             : #include "swdllapi.h"
      24             : #include <hintids.hxx>
      25             : #include <format.hxx>
      26             : 
      27             : class ImageMap;
      28             : class IntlWrapper;
      29             : 
      30             : // URL, ServerMap und ClientMap
      31             : 
      32             : class SW_DLLPUBLIC SwFmtURL: public SfxPoolItem
      33             : {
      34             :     String    sTargetFrameName; ///< Target frame for URL.
      35             :     String    sURL;             ///< Simple URL.
      36             :     String    sName;            ///< Name of the anchor.
      37             :     ImageMap *pMap;             ///< ClientSide images.
      38             : 
      39             :     sal_Bool      bIsServerMap;     ///< A ServerSideImageMap with the URL.
      40             : 
      41             :     SwFmtURL& operator=( const SwFmtURL& );
      42             : 
      43             : public:
      44             :     SwFmtURL();
      45             : 
      46             :     /// @@@ copy construction allowed, but assigment is not? @@@
      47             :     SwFmtURL( const SwFmtURL& );
      48             : 
      49             :     virtual ~SwFmtURL();
      50             : 
      51             :     /// "Pure virtual methods" of SfxPoolItem.
      52             :     virtual int             operator==( const SfxPoolItem& ) const;
      53             :     virtual SfxPoolItem*    Clone( SfxItemPool* pPool = 0 ) const;
      54             :     virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
      55             :                                     SfxMapUnit eCoreMetric,
      56             :                                     SfxMapUnit ePresMetric,
      57             :                                     String &rText,
      58             :                                     const IntlWrapper*    pIntl = 0 ) const;
      59             :     virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const;
      60             :     virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 );
      61             : 
      62           0 :     void SetTargetFrameName( const String& rStr ) { sTargetFrameName = rStr; }
      63             :     void SetURL( const String &rURL, sal_Bool bServerMap );
      64             :     void SetMap( const ImageMap *pM );  ///< Pointer will be copied.
      65             : 
      66           0 :     const String   &GetTargetFrameName()const { return sTargetFrameName; }
      67           0 :     const String   &GetURL()            const { return sURL; }
      68           0 :           sal_Bool      IsServerMap()       const { return bIsServerMap; }
      69           0 :     const ImageMap *GetMap()            const { return pMap; }
      70           0 :           ImageMap *GetMap()                  { return pMap; }
      71             : 
      72           0 :     const String& GetName() const           { return sName; }
      73           0 :     void SetName( const String& rNm )       { sName = rNm; }
      74             : };
      75             : 
      76             : 
      77           0 : inline const SwFmtURL &SwAttrSet::GetURL(sal_Bool bInP) const
      78           0 :     { return (const SwFmtURL&)Get( RES_URL,bInP); }
      79             : 
      80           0 : inline const SwFmtURL &SwFmt::GetURL(sal_Bool bInP) const
      81           0 :     { return aSet.GetURL(bInP); }
      82             : 
      83             : #endif
      84             : 
      85             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10