fix baseline build (old cairo) - 'cairo_rectangle_int_t' does not name a type
[LibreOffice.git] / framework / source / layoutmanager / helpers.hxx
blob9d66e4b4f919fb4c83844f2c63e340c92b95578d
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_FRAMEWORK_SOURCE_LAYOUTMANAGER_HELPERS_HXX
21 #define INCLUDED_FRAMEWORK_SOURCE_LAYOUTMANAGER_HELPERS_HXX
23 #include <macros/generic.hxx>
24 #include <stdtypes.h>
25 #include <properties.h>
27 #include <com/sun/star/awt/XWindowPeer.hpp>
28 #include <com/sun/star/awt/XToolkit2.hpp>
29 #include <com/sun/star/uno/XComponentContext.hpp>
30 #include <com/sun/star/lang/XMultiServiceFactory.hpp>
31 #include <com/sun/star/frame/XFrame.hpp>
32 #include <com/sun/star/ui/XUIElement.hpp>
33 #include <com/sun/star/awt/Rectangle.hpp>
34 #include <com/sun/star/ui/DockingArea.hpp>
35 #include <com/sun/star/awt/Point.hpp>
37 #include <vcl/window.hxx>
38 #include <vcl/toolbox.hxx>
40 #define UIRESOURCE_URL "private:resource"
41 #define UIRESOURCETYPE_TOOLBAR "toolbar"
42 #define UIRESOURCETYPE_MENUBAR "menubar"
44 namespace framework
47 bool hasEmptySize( const ::com::sun::star::awt::Size& rSize );
48 bool hasDefaultPosValue( const ::com::sun::star::awt::Point& rPos );
49 bool isDefaultPos( const ::com::sun::star::awt::Point& rPos );
50 bool isToolboxHorizontalAligned( ToolBox* pToolBox );
51 bool isReverseOrderDockingArea( const sal_Int32 nDockArea );
52 bool isHorizontalDockingArea( const sal_Int32 nDockArea );
53 bool isHorizontalDockingArea( const ::com::sun::star::ui::DockingArea& nDockArea );
54 OUString retrieveToolbarNameFromHelpURL( vcl::Window* pWindow );
55 ToolBox* getToolboxPtr( vcl::Window* pWindow );
56 vcl::Window* getWindowFromXUIElement( const ::com::sun::star::uno::Reference< ::com::sun::star::ui::XUIElement >& xUIElement );
57 SystemWindow* getTopSystemWindow( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow >& xWindow );
58 bool equalRectangles( const css::awt::Rectangle& rRect1, const css::awt::Rectangle& rRect2 );
59 void setZeroRectangle( ::Rectangle& rRect );
60 bool lcl_checkUIElement(const ::com::sun::star::uno::Reference< ::com::sun::star::ui::XUIElement >& xUIElement,::com::sun::star::awt::Rectangle& _rPosSize, ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow >& _xWindow);
61 ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowPeer > createToolkitWindow( const css::uno::Reference< ::com::sun::star::uno::XComponentContext >& rxContext, const css::uno::Reference< ::com::sun::star::awt::XWindowPeer >& rParent, const char* pService );
62 WindowAlign ImplConvertAlignment( sal_Int16 aAlignment );
63 OUString getElementTypeFromResourceURL( const OUString& aResourceURL );
64 void parseResourceURL( const OUString& aResourceURL, OUString& aElementType, OUString& aElementName );
65 ::Rectangle putAWTToRectangle( const ::com::sun::star::awt::Rectangle& rRect );
66 ::com::sun::star::awt::Rectangle putRectangleValueToAWT( const ::Rectangle& rRect );
67 ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel > impl_getModelFromFrame( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame );
68 bool implts_isPreviewModel( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel >& xModel );
69 bool implts_isFrameOrWindowTop( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& xFrame );
70 void impl_setDockingWindowVisibility( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext>& rxContext, const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame, const OUString& rDockingWindowName, bool bVisible );
71 void impl_addWindowListeners( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& xThis, const ::com::sun::star::uno::Reference< css::ui::XUIElement >& xUIElement );
72 ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowPeer > implts_createToolkitWindow( const css::uno::Reference< ::com::sun::star::awt::XToolkit2 >& rToolkit, const css::uno::Reference< ::com::sun::star::awt::XWindowPeer >& rParent );
76 #endif // INCLUDED_FRAMEWORK_SOURCE_LAYOUTMANAGER_HELPERS_HXX
78 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */