LibreOffice Module chart2 (master) 1
RelativePositionHelper.hxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
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/.
8 *
9 * This file incorporates work covered by the following license notice:
10 *
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 .
18 */
19
20#pragma once
21
22#include <com/sun/star/chart2/RelativePosition.hpp>
23#include <com/sun/star/drawing/Alignment.hpp>
24#include <com/sun/star/awt/Point.hpp>
25#include "charttoolsdllapi.hxx"
26
27namespace com::sun::star::awt { struct Size; }
28namespace com::sun::star::chart2 { struct RelativeSize; }
29
30namespace chart
31{
32
34{
35public:
41 static css::awt::Point
42 getUpperLeftCornerOfAnchoredObject(
43 css::awt::Point aPoint,
44 css::awt::Size aObjectSize,
45 css::drawing::Alignment aAnchor );
46
52 static css::awt::Point
53 getCenterOfAnchoredObject(
54 css::awt::Point aPoint,
55 css::awt::Size aUnrotatedObjectSize,
56 css::drawing::Alignment aAnchor,
57 double fAnglePi );
58
63 SAL_DLLPRIVATE static css::chart2::RelativePosition
64 getReanchoredPosition(
65 const css::chart2::RelativePosition & rPosition,
66 const css::chart2::RelativeSize & rObjectSize,
67 css::drawing::Alignment aNewAnchor );
68
81 static bool centerGrow(
82 css::chart2::RelativePosition & rInOutPosition,
83 css::chart2::RelativeSize & rInOutSize,
84 double fAmountX, double fAmountY );
85
95 static bool moveObject(
96 css::chart2::RelativePosition & rInOutPosition,
97 const css::chart2::RelativeSize & rObjectSize,
98 double fAmountX, double fAmountY );
99};
100
101} //namespace chart
102
103/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
#define OOO_DLLPUBLIC_CHARTTOOLS