Don't search for old (<= 2.0) .NET SDK anymore
[LibreOffice.git] / include / tools / svborder.hxx
blob9eef888198473662e2e80c0ad4fba9e885c11ab4
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
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/.
9 * This file incorporates work covered by the following license notice:
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 .
20 #ifndef INCLUDED_TOOLS_SVBORDER_HXX
21 #define INCLUDED_TOOLS_SVBORDER_HXX
23 #include <tools/toolsdllapi.h>
24 #include <tools/gen.hxx>
26 class SAL_WARN_UNUSED TOOLS_DLLPUBLIC SvBorder
28 long nTop, nRight, nBottom, nLeft;
30 public:
31 SvBorder()
33 nTop = nRight = nBottom = nLeft = 0;
35 SvBorder( long nLeftP, long nTopP, long nRightP, long nBottomP )
37 nLeft = nLeftP;
38 nTop = nTopP;
39 nRight = nRightP;
40 nBottom = nBottomP;
42 bool operator == ( const SvBorder & rObj ) const
44 return nTop == rObj.nTop && nRight == rObj.nRight &&
45 nBottom == rObj.nBottom && nLeft == rObj.nLeft;
47 bool operator != ( const SvBorder & rObj ) const
48 { return !(*this == rObj); }
49 SvBorder & operator = ( const SvBorder & rBorder )
51 Left() = rBorder.Left();
52 Top() = rBorder.Top();
53 Right() = rBorder.Right();
54 Bottom() = rBorder.Bottom();
55 return *this;
57 SvBorder & operator += ( const SvBorder & rBorder )
59 Left() += rBorder.Left();
60 Top() += rBorder.Top();
61 Right() += rBorder.Right();
62 Bottom() += rBorder.Bottom();
63 return *this;
65 long & Top() { return nTop; }
66 long & Right() { return nRight; }
67 long & Bottom() { return nBottom; }
68 long & Left() { return nLeft; }
69 long Top() const { return nTop; }
70 long Right() const { return nRight; }
71 long Bottom() const { return nBottom; }
72 long Left() const { return nLeft; }
75 TOOLS_DLLPUBLIC tools::Rectangle & operator += ( tools::Rectangle & rRect, const SvBorder & rBorder );
77 #endif
79 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */