2010-10-14 08:27:31 +02:00
|
|
|
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
2012-06-21 14:30:25 +01:00
|
|
|
/*
|
|
|
|
* This file is part of the LibreOffice project.
|
|
|
|
*
|
|
|
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
|
|
*
|
|
|
|
* This file incorporates work covered by the following license notice:
|
|
|
|
*
|
|
|
|
* Licensed to the Apache Software Foundation (ASF) under one or more
|
|
|
|
* contributor license agreements. See the NOTICE file distributed
|
|
|
|
* with this work for additional information regarding copyright
|
|
|
|
* ownership. The ASF licenses this file to you under the Apache
|
|
|
|
* License, Version 2.0 (the "License"); you may not use this file
|
|
|
|
* except in compliance with the License. You may obtain a copy of
|
|
|
|
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
|
|
|
|
*/
|
2013-10-23 19:14:56 +02:00
|
|
|
#ifndef INCLUDED_SVTOOLS_IMAPRECT_HXX
|
|
|
|
#define INCLUDED_SVTOOLS_IMAPRECT_HXX
|
2007-04-11 18:23:15 +00:00
|
|
|
|
2013-11-09 15:40:46 -06:00
|
|
|
#include <svtools/svtdllapi.h>
|
2007-04-11 18:23:15 +00:00
|
|
|
#include <svtools/imapobj.hxx>
|
|
|
|
#include <tools/gen.hxx>
|
|
|
|
|
2014-10-23 17:41:47 +02:00
|
|
|
class Fraction;
|
2014-10-23 17:30:09 +02:00
|
|
|
|
2007-04-11 18:23:15 +00:00
|
|
|
class SVT_DLLPUBLIC IMapRectangleObject : public IMapObject
|
|
|
|
{
|
2017-03-30 20:27:55 +02:00
|
|
|
tools::Rectangle aRect;
|
2007-04-11 18:23:15 +00:00
|
|
|
|
2017-03-30 20:27:55 +02:00
|
|
|
SVT_DLLPRIVATE void ImpConstruct( const tools::Rectangle& rRect, bool bPixel );
|
2007-04-11 18:23:15 +00:00
|
|
|
|
|
|
|
protected:
|
|
|
|
|
2014-12-16 18:32:29 +01:00
|
|
|
// binary import/export
|
2015-10-12 16:04:04 +02:00
|
|
|
virtual void WriteIMapObject( SvStream& rOStm ) const override;
|
|
|
|
virtual void ReadIMapObject( SvStream& rIStm ) override;
|
2007-04-11 18:23:15 +00:00
|
|
|
|
|
|
|
public:
|
|
|
|
|
|
|
|
IMapRectangleObject() {};
|
2017-03-30 20:27:55 +02:00
|
|
|
IMapRectangleObject( const tools::Rectangle& rRect,
|
2013-08-15 09:10:28 +02:00
|
|
|
const OUString& rURL,
|
|
|
|
const OUString& rAltText,
|
|
|
|
const OUString& rDesc,
|
|
|
|
const OUString& rTarget,
|
|
|
|
const OUString& rName,
|
2014-03-20 16:07:35 +02:00
|
|
|
bool bActive = true,
|
|
|
|
bool bPixelCoords = true );
|
2007-04-11 18:23:15 +00:00
|
|
|
|
2015-10-12 16:04:04 +02:00
|
|
|
virtual sal_uInt16 GetType() const override;
|
|
|
|
virtual bool IsHit( const Point& rPoint ) const override;
|
2007-04-11 18:23:15 +00:00
|
|
|
|
2017-03-30 20:27:55 +02:00
|
|
|
tools::Rectangle GetRectangle( bool bPixelCoords = true ) const;
|
2007-04-11 18:23:15 +00:00
|
|
|
|
2014-10-23 17:41:47 +02:00
|
|
|
void Scale( const Fraction& rFractX, const Fraction& rFracY );
|
2007-04-11 18:23:15 +00:00
|
|
|
|
|
|
|
using IMapObject::IsEqual;
|
2014-03-20 16:07:35 +02:00
|
|
|
bool IsEqual( const IMapRectangleObject& rEqObj );
|
2007-04-11 18:23:15 +00:00
|
|
|
|
2014-12-16 18:32:29 +01:00
|
|
|
// import/export
|
2017-05-24 14:29:48 +02:00
|
|
|
void WriteCERN( SvStream& rOStm ) const;
|
|
|
|
void WriteNCSA( SvStream& rOStm ) const;
|
2007-04-11 18:23:15 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|
2010-10-14 08:27:31 +02:00
|
|
|
|
|
|
|
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|