2010-10-14 01:30:41 -05:00
|
|
|
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
2000-09-18 11:15:01 -05:00
|
|
|
/*************************************************************************
|
|
|
|
*
|
2008-04-10 05:12:50 -05:00
|
|
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
2000-09-18 11:15:01 -05:00
|
|
|
*
|
2010-02-12 08:01:35 -06:00
|
|
|
* Copyright 2000, 2010 Oracle and/or its affiliates.
|
2000-09-18 11:15:01 -05:00
|
|
|
*
|
2008-04-10 05:12:50 -05:00
|
|
|
* OpenOffice.org - a multi-platform office productivity suite
|
2000-09-18 11:15:01 -05:00
|
|
|
*
|
2008-04-10 05:12:50 -05:00
|
|
|
* This file is part of OpenOffice.org.
|
2000-09-18 11:15:01 -05:00
|
|
|
*
|
2008-04-10 05:12:50 -05:00
|
|
|
* OpenOffice.org is free software: you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU Lesser General Public License version 3
|
|
|
|
* only, as published by the Free Software Foundation.
|
2000-09-18 11:15:01 -05:00
|
|
|
*
|
2008-04-10 05:12:50 -05:00
|
|
|
* OpenOffice.org is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU Lesser General Public License version 3 for more details
|
|
|
|
* (a copy is included in the LICENSE file that accompanied this code).
|
2000-09-18 11:15:01 -05:00
|
|
|
*
|
2008-04-10 05:12:50 -05:00
|
|
|
* You should have received a copy of the GNU Lesser General Public License
|
|
|
|
* version 3 along with OpenOffice.org. If not, see
|
|
|
|
* <http://www.openoffice.org/license.html>
|
|
|
|
* for a copy of the LGPLv3 License.
|
2000-09-18 11:15:01 -05:00
|
|
|
*
|
|
|
|
************************************************************************/
|
|
|
|
#ifndef _FMTINFMT_HXX
|
|
|
|
#define _FMTINFMT_HXX
|
|
|
|
|
|
|
|
#include <tools/string.hxx>
|
2009-10-15 17:05:16 -05:00
|
|
|
#include <svl/poolitem.hxx>
|
2004-08-23 02:34:05 -05:00
|
|
|
#include "swdllapi.h"
|
|
|
|
|
2000-09-18 11:15:01 -05:00
|
|
|
class SvxMacro;
|
|
|
|
class SvxMacroTableDtor;
|
2005-06-14 10:26:47 -05:00
|
|
|
class SwTxtINetFmt;
|
2001-05-12 21:33:31 -05:00
|
|
|
class IntlWrapper;
|
2004-08-23 02:34:05 -05:00
|
|
|
|
2011-02-06 19:08:11 -06:00
|
|
|
// ATT_INETFMT
|
2000-09-18 11:15:01 -05:00
|
|
|
|
2004-08-23 02:34:05 -05:00
|
|
|
class SW_DLLPUBLIC SwFmtINetFmt: public SfxPoolItem
|
2000-09-18 11:15:01 -05:00
|
|
|
{
|
|
|
|
friend class SwTxtINetFmt;
|
|
|
|
|
2011-02-06 19:08:11 -06:00
|
|
|
String aURL; // URL.
|
|
|
|
String aTargetFrame; // Target frame for URL.
|
2000-09-18 11:15:01 -05:00
|
|
|
String aINetFmt;
|
|
|
|
String aVisitedFmt;
|
2011-02-06 19:08:11 -06:00
|
|
|
String aName; // Name of the link.
|
2000-09-18 11:15:01 -05:00
|
|
|
SvxMacroTableDtor* pMacroTbl;
|
2011-02-06 19:08:11 -06:00
|
|
|
SwTxtINetFmt* pTxtAttr; // My TextAttribute.
|
2011-01-17 08:06:54 -06:00
|
|
|
sal_uInt16 nINetId;
|
|
|
|
sal_uInt16 nVisitedId;
|
2000-09-18 11:15:01 -05:00
|
|
|
public:
|
|
|
|
SwFmtINetFmt( const String& rURL, const String& rTarget );
|
|
|
|
SwFmtINetFmt( const SwFmtINetFmt& rAttr );
|
2011-02-06 19:08:11 -06:00
|
|
|
SwFmtINetFmt(); // For TypeInfo.
|
2000-09-18 11:15:01 -05:00
|
|
|
virtual ~SwFmtINetFmt();
|
|
|
|
|
2002-06-27 02:26:16 -05:00
|
|
|
TYPEINFO();
|
|
|
|
|
2011-02-06 19:08:11 -06:00
|
|
|
// "Pure virtual methods" of SfxPoolItem.
|
2000-09-18 11:15:01 -05:00
|
|
|
virtual int operator==( const SfxPoolItem& ) const;
|
|
|
|
virtual SfxPoolItem* Clone( SfxItemPool* pPool = 0 ) const;
|
|
|
|
virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
|
|
|
|
SfxMapUnit eCoreMetric,
|
|
|
|
SfxMapUnit ePresMetric,
|
|
|
|
String &rText,
|
2001-05-12 21:33:31 -05:00
|
|
|
const IntlWrapper* pIntl = 0 ) const;
|
2000-09-18 11:15:01 -05:00
|
|
|
|
2010-10-04 09:23:52 -05:00
|
|
|
virtual bool QueryValue( com::sun::star::uno::Any& rVal,
|
2011-01-17 08:06:54 -06:00
|
|
|
sal_uInt8 nMemberId = 0 ) const;
|
2010-10-04 09:23:52 -05:00
|
|
|
virtual bool PutValue( const com::sun::star::uno::Any& rVal,
|
2011-01-17 08:06:54 -06:00
|
|
|
sal_uInt8 nMemberId = 0 );
|
2000-09-18 11:15:01 -05:00
|
|
|
|
|
|
|
|
|
|
|
const SwTxtINetFmt* GetTxtINetFmt() const { return pTxtAttr; }
|
|
|
|
SwTxtINetFmt* GetTxtINetFmt() { return pTxtAttr; }
|
|
|
|
|
|
|
|
const String& GetValue() const { return aURL; }
|
|
|
|
|
|
|
|
const String& GetName() const { return aName; }
|
|
|
|
void SetName( const String& rNm ) { aName = rNm; }
|
|
|
|
|
|
|
|
const String& GetTargetFrame() const { return aTargetFrame; }
|
|
|
|
|
|
|
|
const String& GetINetFmt() const { return aINetFmt; }
|
|
|
|
void SetINetFmt( const String& rNm ) { aINetFmt = rNm; }
|
|
|
|
|
|
|
|
const String& GetVisitedFmt() const { return aVisitedFmt; }
|
|
|
|
void SetVisitedFmt( const String& rNm ) { aVisitedFmt = rNm; }
|
|
|
|
|
2011-01-17 08:06:54 -06:00
|
|
|
sal_uInt16 GetINetFmtId() const { return nINetId; }
|
|
|
|
void SetINetFmtId( sal_uInt16 nNew ) { nINetId = nNew; }
|
2000-09-18 11:15:01 -05:00
|
|
|
|
2011-01-17 08:06:54 -06:00
|
|
|
sal_uInt16 GetVisitedFmtId() const { return nVisitedId; }
|
|
|
|
void SetVisitedFmtId( sal_uInt16 nNew ) { nVisitedId = nNew; }
|
2000-09-18 11:15:01 -05:00
|
|
|
|
2011-02-06 19:08:11 -06:00
|
|
|
// Set a new MacroTable or clear the current one.
|
2000-09-18 11:15:01 -05:00
|
|
|
void SetMacroTbl( const SvxMacroTableDtor* pTbl = 0 );
|
|
|
|
const SvxMacroTableDtor* GetMacroTbl() const { return pMacroTbl; }
|
|
|
|
|
2011-02-06 19:08:11 -06:00
|
|
|
// Macro getter and setter.
|
2011-01-17 08:06:54 -06:00
|
|
|
void SetMacro( sal_uInt16 nEvent, const SvxMacro& rMacro );
|
|
|
|
const SvxMacro* GetMacro( sal_uInt16 nEvent ) const;
|
2000-09-18 11:15:01 -05:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
2010-10-14 01:30:41 -05:00
|
|
|
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|