summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/editeng/outliner.hxx1
-rw-r--r--include/sfx2/lokcharthelper.hxx60
-rw-r--r--include/sfx2/viewsh.hxx3
-rw-r--r--include/vcl/window.hxx4
4 files changed, 68 insertions, 0 deletions
diff --git a/include/editeng/outliner.hxx b/include/editeng/outliner.hxx
index 3e7e889064d1..1cc38d50263e 100644
--- a/include/editeng/outliner.hxx
+++ b/include/editeng/outliner.hxx
@@ -384,6 +384,7 @@ public:
virtual void NotifyOtherViews(int nType, const OString& rKey, const OString& rPayload) = 0;
/// Wrapper around SfxLokHelper::notifyOtherView().
virtual void NotifyOtherView(OutlinerViewShell* pOtherShell, int nType, const OString& rKey, const OString& rPayload) = 0;
+ virtual vcl::Window* GetEditWindowForActiveOLEObj() const = 0;
protected:
~OutlinerViewShell() throw () {}
diff --git a/include/sfx2/lokcharthelper.hxx b/include/sfx2/lokcharthelper.hxx
new file mode 100644
index 000000000000..deb2c43f0556
--- /dev/null
+++ b/include/sfx2/lokcharthelper.hxx
@@ -0,0 +1,60 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * 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/.
+ */
+
+#ifndef INCLUDED_SFX2_LOKCHARTHELPER_HXX
+#define INCLUDED_SFX2_LOKCHARTHELPER_HXX
+
+#include <sfx2/dllapi.h>
+#include <tools/gen.hxx>
+#include <vcl/window.hxx>
+
+#include <com/sun/star/frame/XController.hpp>
+#include <com/sun/star/frame/XDispatch.hpp>
+
+class SfxViewShell;
+class VirtualDevice;
+
+class SFX2_DLLPUBLIC LokChartHelper
+{
+private:
+ SfxViewShell* mpViewShell;
+ css::uno::Reference<css::frame::XController> mxController;
+ css::uno::Reference<css::frame::XDispatch> mxDispatcher;
+ VclPtr<vcl::Window> mpWindow;
+
+public:
+ LokChartHelper(SfxViewShell* pViewShell)
+ : mpViewShell(pViewShell)
+ , mpWindow(nullptr)
+ {}
+
+ css::uno::Reference<css::frame::XController>& GetXController();
+ css::uno::Reference<css::frame::XDispatch>& GetXDispatcher();
+ vcl::Window* GetWindow();
+ tools::Rectangle GetChartBoundingBox();
+ void Invalidate();
+
+ bool Hit(const Point& aPos);
+ static bool HitAny(const Point& aPos);
+ void PaintTile(VirtualDevice& rRenderContext, const tools::Rectangle& rTileRect);
+ static void PaintAllChartsOnTile(VirtualDevice& rDevice,
+ int nOutputWidth, int nOutputHeight,
+ int nTilePosX, int nTilePosY,
+ long nTileWidth, long nTileHeight);
+ bool postMouseEvent(int nType, int nX, int nY,
+ int nCount, int nButtons, int nModifier,
+ double fScaleX = 1.0, double fScaleY = 1.0);
+ bool setTextSelection(int nType, int nX, int nY);
+ bool setGraphicSelection(int nType, int nX, int nY,
+ double fScaleX = 1.0, double fScaleY = 1.0);
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/sfx2/viewsh.hxx b/include/sfx2/viewsh.hxx
index 89bb429aa41b..f186f8d4135a 100644
--- a/include/sfx2/viewsh.hxx
+++ b/include/sfx2/viewsh.hxx
@@ -336,6 +336,9 @@ public:
virtual void NotifyCursor(SfxViewShell* /*pViewShell*/) const;
/// Where a new view can perform some update/initialization soon after the callback has been registered.
virtual void afterCallbackRegistered();
+ /// See OutlinerViewShell::GetEditWindowForActiveOLEObj().
+ virtual vcl::Window* GetEditWindowForActiveOLEObj() const override;
+
};
diff --git a/include/vcl/window.hxx b/include/vcl/window.hxx
index 7c2aa534fa69..3b8a42ac5d0b 100644
--- a/include/vcl/window.hxx
+++ b/include/vcl/window.hxx
@@ -931,6 +931,7 @@ public:
vcl::Window* GetParent() const;
// return the dialog we are contained in or NULL if un-contained
Dialog* GetParentDialog() const;
+ bool IsAncestorOf( const vcl::Window& rWindow ) const;
void Show( bool bVisible = true, ShowFlags nFlags = ShowFlags::NONE );
void Hide() { Show( false ); }
@@ -1030,6 +1031,7 @@ public:
virtual void SetOutputSizePixel( const Size& rNewSize );
bool IsDefaultPos() const;
bool IsDefaultSize() const;
+ Point GetOffsetPixelFrom(const vcl::Window& rWindow) const;
// those conversion routines might deliver different results during UI mirroring
Point OutputToScreenPixel( const Point& rPos ) const;
@@ -1540,6 +1542,8 @@ public:
virtual Selection GetSurroundingTextSelection() const;
virtual FactoryFunction GetUITestFactory() const;
+
+ virtual bool IsChart() const { return false; }
};
}