LCOV - code coverage report
Current view: top level - sw/inc - fmturl.hxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 10 12 83.3 %
Date: 2012-08-25 Functions: 8 10 80.0 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 0 0 -

           Branch data     Line data    Source code
       1                 :            : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
       2                 :            : /*************************************************************************
       3                 :            :  *
       4                 :            :  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
       5                 :            :  *
       6                 :            :  * Copyright 2000, 2010 Oracle and/or its affiliates.
       7                 :            :  *
       8                 :            :  * OpenOffice.org - a multi-platform office productivity suite
       9                 :            :  *
      10                 :            :  * This file is part of OpenOffice.org.
      11                 :            :  *
      12                 :            :  * OpenOffice.org is free software: you can redistribute it and/or modify
      13                 :            :  * it under the terms of the GNU Lesser General Public License version 3
      14                 :            :  * only, as published by the Free Software Foundation.
      15                 :            :  *
      16                 :            :  * OpenOffice.org is distributed in the hope that it will be useful,
      17                 :            :  * but WITHOUT ANY WARRANTY; without even the implied warranty of
      18                 :            :  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
      19                 :            :  * GNU Lesser General Public License version 3 for more details
      20                 :            :  * (a copy is included in the LICENSE file that accompanied this code).
      21                 :            :  *
      22                 :            :  * You should have received a copy of the GNU Lesser General Public License
      23                 :            :  * version 3 along with OpenOffice.org.  If not, see
      24                 :            :  * <http://www.openoffice.org/license.html>
      25                 :            :  * for a copy of the LGPLv3 License.
      26                 :            :  *
      27                 :            :  ************************************************************************/
      28                 :            : #ifndef _FMTURL_HXX
      29                 :            : #define _FMTURL_HXX
      30                 :            : 
      31                 :            : #include <svl/poolitem.hxx>
      32                 :            : #include "swdllapi.h"
      33                 :            : #include <hintids.hxx>
      34                 :            : #include <format.hxx>
      35                 :            : 
      36                 :            : class ImageMap;
      37                 :            : class IntlWrapper;
      38                 :            : 
      39                 :            : // URL, ServerMap und ClientMap
      40                 :            : 
      41                 :            : class SW_DLLPUBLIC SwFmtURL: public SfxPoolItem
      42                 :            : {
      43                 :            :     String    sTargetFrameName; // Target frame for URL.
      44                 :            :     String    sURL;             // Simple URL.
      45                 :            :     String    sName;            // Name of the anchor.
      46                 :            :     ImageMap *pMap;             // ClientSide images.
      47                 :            : 
      48                 :            :     sal_Bool      bIsServerMap;     // A ServerSideImageMap with the URL.
      49                 :            : 
      50                 :            :     SwFmtURL& operator=( const SwFmtURL& );
      51                 :            : 
      52                 :            : public:
      53                 :            :     SwFmtURL();
      54                 :            : 
      55                 :            :     // @@@ copy construction allowed, but assigment is not? @@@
      56                 :            :     SwFmtURL( const SwFmtURL& );
      57                 :            : 
      58                 :            :     virtual ~SwFmtURL();
      59                 :            : 
      60                 :            :     // "Pure virtual methods" of SfxPoolItem.
      61                 :            :     virtual int             operator==( const SfxPoolItem& ) const;
      62                 :            :     virtual SfxPoolItem*    Clone( SfxItemPool* pPool = 0 ) const;
      63                 :            :     virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
      64                 :            :                                     SfxMapUnit eCoreMetric,
      65                 :            :                                     SfxMapUnit ePresMetric,
      66                 :            :                                     String &rText,
      67                 :            :                                     const IntlWrapper*    pIntl = 0 ) const;
      68                 :            :     virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const;
      69                 :            :     virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 );
      70                 :            : 
      71                 :          0 :     void SetTargetFrameName( const String& rStr ) { sTargetFrameName = rStr; }
      72                 :            :     void SetURL( const String &rURL, sal_Bool bServerMap );
      73                 :            :     void SetMap( const ImageMap *pM );  // Pointer will be copied.
      74                 :            : 
      75                 :         44 :     const String   &GetTargetFrameName()const { return sTargetFrameName; }
      76                 :        101 :     const String   &GetURL()            const { return sURL; }
      77                 :         44 :           sal_Bool      IsServerMap()       const { return bIsServerMap; }
      78                 :        123 :     const ImageMap *GetMap()            const { return pMap; }
      79                 :         38 :           ImageMap *GetMap()                  { return pMap; }
      80                 :            : 
      81                 :         44 :     const String& GetName() const           { return sName; }
      82                 :          0 :     void SetName( const String& rNm )       { sName = rNm; }
      83                 :            : };
      84                 :            : 
      85                 :            : 
      86                 :         93 : inline const SwFmtURL &SwAttrSet::GetURL(sal_Bool bInP) const
      87                 :         93 :     { return (const SwFmtURL&)Get( RES_URL,bInP); }
      88                 :            : 
      89                 :         93 : inline const SwFmtURL &SwFmt::GetURL(sal_Bool bInP) const
      90                 :         93 :     { return aSet.GetURL(bInP); }
      91                 :            : 
      92                 :            : #endif
      93                 :            : 
      94                 :            : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10