2010-10-14 08:27:31 +02:00
|
|
|
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
2012-07-11 09:51:50 +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 .
|
|
|
|
*/
|
2007-04-11 19:18:39 +00:00
|
|
|
|
2013-10-23 19:15:52 +02:00
|
|
|
#ifndef INCLUDED_TOOLS_SVBORDER_HXX
|
|
|
|
#define INCLUDED_TOOLS_SVBORDER_HXX
|
2007-04-11 19:18:39 +00:00
|
|
|
|
2013-11-09 15:37:43 -06:00
|
|
|
#include <tools/toolsdllapi.h>
|
2007-04-11 19:18:39 +00:00
|
|
|
#include <tools/gen.hxx>
|
|
|
|
|
2017-10-04 10:16:31 +02:00
|
|
|
class SAL_WARN_UNUSED TOOLS_DLLPUBLIC SvBorder
|
2007-04-11 19:18:39 +00:00
|
|
|
{
|
|
|
|
long nTop, nRight, nBottom, nLeft;
|
2012-08-13 23:33:49 +02:00
|
|
|
|
2007-04-11 19:18:39 +00:00
|
|
|
public:
|
|
|
|
SvBorder()
|
2012-12-25 15:18:26 +01:00
|
|
|
{
|
|
|
|
nTop = nRight = nBottom = nLeft = 0;
|
|
|
|
}
|
2007-04-11 19:18:39 +00:00
|
|
|
SvBorder( long nLeftP, long nTopP, long nRightP, long nBottomP )
|
2012-12-25 15:18:26 +01:00
|
|
|
{
|
|
|
|
nLeft = nLeftP;
|
|
|
|
nTop = nTopP;
|
|
|
|
nRight = nRightP;
|
|
|
|
nBottom = nBottomP;
|
|
|
|
}
|
2013-06-29 23:57:38 -05:00
|
|
|
bool operator == ( const SvBorder & rObj ) const
|
2007-04-11 19:18:39 +00:00
|
|
|
{
|
|
|
|
return nTop == rObj.nTop && nRight == rObj.nRight &&
|
|
|
|
nBottom == rObj.nBottom && nLeft == rObj.nLeft;
|
|
|
|
}
|
2013-06-29 23:57:38 -05:00
|
|
|
bool operator != ( const SvBorder & rObj ) const
|
2007-04-11 19:18:39 +00:00
|
|
|
{ return !(*this == rObj); }
|
2010-04-09 08:31:28 +02:00
|
|
|
SvBorder & operator = ( const SvBorder & rBorder )
|
|
|
|
{
|
|
|
|
Left() = rBorder.Left();
|
|
|
|
Top() = rBorder.Top();
|
|
|
|
Right() = rBorder.Right();
|
|
|
|
Bottom() = rBorder.Bottom();
|
|
|
|
return *this;
|
|
|
|
}
|
2007-04-11 19:18:39 +00:00
|
|
|
SvBorder & operator += ( const SvBorder & rBorder )
|
|
|
|
{
|
|
|
|
Left() += rBorder.Left();
|
|
|
|
Top() += rBorder.Top();
|
|
|
|
Right() += rBorder.Right();
|
|
|
|
Bottom() += rBorder.Bottom();
|
|
|
|
return *this;
|
|
|
|
}
|
|
|
|
long & Top() { return nTop; }
|
|
|
|
long & Right() { return nRight; }
|
|
|
|
long & Bottom() { return nBottom; }
|
|
|
|
long & Left() { return nLeft; }
|
|
|
|
long Top() const { return nTop; }
|
|
|
|
long Right() const { return nRight; }
|
|
|
|
long Bottom() const { return nBottom; }
|
|
|
|
long Left() const { return nLeft; }
|
|
|
|
};
|
|
|
|
|
2017-03-30 20:27:55 +02:00
|
|
|
TOOLS_DLLPUBLIC tools::Rectangle & operator += ( tools::Rectangle & rRect, const SvBorder & rBorder );
|
2007-04-11 19:18:39 +00:00
|
|
|
|
|
|
|
#endif
|
|
|
|
|
2010-10-14 08:27:31 +02:00
|
|
|
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|