LCOV - code coverage report
Current view: top level - sw/inc - fmturl.hxx (source / functions) Hit Total Coverage
Test: commit 10e77ab3ff6f4314137acd6e2702a6e5c1ce1fae Lines: 12 12 100.0 %
Date: 2014-11-03 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 SwFmtURL: 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             :     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 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          10 :     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         174 :     OUString GetTargetFrameName()const { return sTargetFrameName; }
      67         252 :     OUString GetURL()            const { return sURL; }
      68         178 :           bool      IsServerMap()       const { return bIsServerMap; }
      69         270 :     const ImageMap *GetMap()            const { return pMap; }
      70          92 :           ImageMap *GetMap()                  { return pMap; }
      71             : 
      72         170 :     OUString GetName() const                { return sName; }
      73          10 :     void SetName( const OUString& rNm )     { sName = rNm; }
      74             : };
      75             : 
      76         162 : inline const SwFmtURL &SwAttrSet::GetURL(bool bInP) const
      77         162 :     { return (const SwFmtURL&)Get( RES_URL,bInP); }
      78             : 
      79         160 : inline const SwFmtURL &SwFmt::GetURL(bool bInP) const
      80         160 :     { return aSet.GetURL(bInP); }
      81             : 
      82             : #endif
      83             : 
      84             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10