LCOV - code coverage report
Current view: top level - sw/inc - fmturl.hxx (source / functions) Hit Total Coverage
Test: commit c8344322a7af75b84dd3ca8f78b05543a976dfd5 Lines: 12 12 100.0 %
Date: 2015-06-13 12:38:46 Functions: 10 10 100.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_FMTURL_HXX
      20             : #define INCLUDED_SW_INC_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 SwFormatURL: public SfxPoolItem
      33             : {
      34             :     OUString  sTargetFrameName; ///< Target frame for URL.
      35             :     OUString  sURL;             ///< Simple URL.
      36             :     OUString  sName;            ///< Name of the anchor.
      37             :     ImageMap *pMap;             ///< ClientSide images.
      38             : 
      39             :     bool      bIsServerMap;     ///< A ServerSideImageMap with the URL.
      40             : 
      41             :     SwFormatURL& operator=( const SwFormatURL& ) SAL_DELETED_FUNCTION;
      42             : 
      43             : public:
      44             :     SwFormatURL();
      45             : 
      46             :     /// @@@ copy construction allowed, but assigment is not? @@@
      47             :     SwFormatURL( const SwFormatURL& );
      48             : 
      49             :     virtual ~SwFormatURL();
      50             : 
      51             :     /// "Pure virtual methods" of SfxPoolItem.
      52             :     virtual bool            operator==( const SfxPoolItem& ) const SAL_OVERRIDE;
      53             :     virtual SfxPoolItem*    Clone( SfxItemPool* pPool = 0 ) const SAL_OVERRIDE;
      54             :     virtual bool GetPresentation( SfxItemPresentation ePres,
      55             :                                     SfxMapUnit eCoreMetric,
      56             :                                     SfxMapUnit ePresMetric,
      57             :                                     OUString &rText,
      58             :                                     const IntlWrapper*    pIntl = 0 ) const SAL_OVERRIDE;
      59             :     virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const SAL_OVERRIDE;
      60             :     virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) SAL_OVERRIDE;
      61             : 
      62           5 :     void SetTargetFrameName( const OUString& rStr ) { sTargetFrameName = rStr; }
      63             :     void SetURL(const OUString &rURL, bool bServerMap);
      64             :     void SetMap( const ImageMap *pM );  ///< Pointer will be copied.
      65             : 
      66         135 :     OUString GetTargetFrameName()const { return sTargetFrameName; }
      67         153 :     OUString GetURL()            const { return sURL; }
      68         137 :           bool      IsServerMap()       const { return bIsServerMap; }
      69         153 :     const ImageMap *GetMap()            const { return pMap; }
      70          50 :           ImageMap *GetMap()                  { return pMap; }
      71             : 
      72         133 :     OUString GetName() const                { return sName; }
      73           5 :     void SetName( const OUString& rNm )     { sName = rNm; }
      74             : };
      75             : 
      76          67 : inline const SwFormatURL &SwAttrSet::GetURL(bool bInP) const
      77          67 :     { return static_cast<const SwFormatURL&>(Get( RES_URL,bInP)); }
      78             : 
      79          66 : inline const SwFormatURL &SwFormat::GetURL(bool bInP) const
      80          66 :     { return m_aSet.GetURL(bInP); }
      81             : 
      82             : #endif
      83             : 
      84             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.11