LibreOffice Module sfx2 (master) 1
ipclient.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#ifndef INCLUDED_SFX2_IPCLIENT_HXX
20#define INCLUDED_SFX2_IPCLIENT_HXX
21
22#include <sal/config.h>
23#include <sfx2/dllapi.h>
24#include <sal/types.h>
25#include <rtl/ref.hxx>
26
27#include <tools/gen.hxx>
28
30#include <vcl/vclptr.hxx>
31
32namespace com::sun::star::embed { class XEmbeddedObject; }
33namespace com::sun::star::uno { template <typename > class Reference; }
34namespace vcl { class Window; }
35
37class SfxViewShell;
38class SfxObjectShell;
39class Fraction;
40
41
43{
45
49
50 // called after the requested new object area was negotiated
51 SAL_DLLPRIVATE virtual void ObjectAreaChanged();
52
53 // an active object was resized by the user and now asks for the new space
54 SAL_DLLPRIVATE virtual void RequestNewObjectArea( tools::Rectangle& );
55
56 // notify the client that an active object has changed its VisualAreaSize
57 SAL_DLLPRIVATE virtual void ViewChanged();
58
59public:
60 SfxInPlaceClient( SfxViewShell* pViewShell, vcl::Window* pDraw, sal_Int64 nAspect );
61 virtual ~SfxInPlaceClient();
62
65
66 SfxViewShell* GetViewShell() const { return m_pViewSh; }
67 vcl::Window* GetEditWin() const { return m_pEditWin; }
68 const css::uno::Reference < css::embed::XEmbeddedObject >& GetObject() const;
69 void SetObject( const css::uno::Reference < css::embed::XEmbeddedObject >& rObject );
70 void SetObjectState( sal_Int32 );
71 bool IsObjectUIActive() const;
72 bool IsObjectInPlaceActive() const;
73 void DeactivateObject();
74 bool SetObjArea( const tools::Rectangle & );
75 const tools::Rectangle& GetObjArea() const;
76 tools::Rectangle GetScaledObjArea() const;
77 void SetSizeScale( const Fraction & rScaleWidth, const Fraction & rScaleHeight );
78 void SetObjAreaAndScale( const tools::Rectangle&, const Fraction&, const Fraction& );
79 const Fraction& GetScaleWidth() const;
80 const Fraction& GetScaleHeight() const;
81 void Invalidate();
82 static SfxInPlaceClient* GetClient( SfxObjectShell const * pDoc, const css::uno::Reference < css::embed::XEmbeddedObject >& xObject );
83 sal_Int64 GetAspect() const;
84 sal_Int64 GetObjectMiscStatus() const;
85 ErrCode DoVerb(sal_Int32 nVerb);
86 void VisAreaChanged();
87 void ResetObject();
88 bool IsUIActive() const;
89
91 void SetNegativeX(bool bSet);
92 bool IsNegativeX() const;
93
94 virtual void FormatChanged(); // object format was changed (used for StarMath formulas aligning)
95
96 virtual bool IsProtected() const;
97};
98
99#endif
100
101/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
VclPtr< vcl::Window > m_pEditWin
Definition: ipclient.hxx:48
SfxViewShell * m_pViewSh
Definition: ipclient.hxx:47
vcl::Window * GetEditWin() const
Definition: ipclient.hxx:67
rtl::Reference< SfxInPlaceClient_Impl > m_xImp
Definition: ipclient.hxx:46
SfxInPlaceClient & operator=(const SfxInPlaceClient &)=delete
SfxViewShell * GetViewShell() const
Definition: ipclient.hxx:66
SfxInPlaceClient(const SfxInPlaceClient &)=delete
One SfxViewShell more or less represents one edit window for a document, there can be multiple ones f...
Definition: viewsh.hxx:165
virtual css::uno::Reference< css::embed::XEmbeddedObject > GetObject() override
#define SFX2_DLLPUBLIC
Definition: dllapi.h:29
Implementation of the interface com.sun.star.rdf.XDocumentMetadataAccess.
Reference