diff options
author | Caolán McNamara <caolanm@redhat.com> | 2016-08-07 16:55:33 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2016-08-08 14:29:08 +0100 |
commit | d07184581894740f08bdcaa4c06f39ed32b73874 (patch) | |
tree | 1a25801af5a550c3373a5a806448d170e9fa81e3 /sc/source/ui/inc | |
parent | 0ccf1e3bab080a74c4aea96dd3bb9ad29aac81e4 (diff) |
Related: tdf#92530 turn the HintWindow into an Overlay
Change-Id: I4cde152cfb4a3ec4127442a6ced9a80ef6235c8f
Diffstat (limited to 'sc/source/ui/inc')
-rw-r--r-- | sc/source/ui/inc/hintwin.hxx | 44 | ||||
-rw-r--r-- | sc/source/ui/inc/overlayobject.hxx | 16 | ||||
-rw-r--r-- | sc/source/ui/inc/tabview.hxx | 3 |
3 files changed, 11 insertions, 52 deletions
diff --git a/sc/source/ui/inc/hintwin.hxx b/sc/source/ui/inc/hintwin.hxx deleted file mode 100644 index 386e340eb650..000000000000 --- a/sc/source/ui/inc/hintwin.hxx +++ /dev/null @@ -1,44 +0,0 @@ -/* -*- 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/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ - -#ifndef INCLUDED_SC_SOURCE_UI_INC_HINTWIN_HXX -#define INCLUDED_SC_SOURCE_UI_INC_HINTWIN_HXX - -#include <vcl/window.hxx> - -class ScHintWindow : public vcl::Window -{ -private: - OUString m_aTitle; - OUString m_aMessage; - Point m_aTextStart; - long m_nTextHeight; - vcl::Font m_aTextFont; - vcl::Font m_aHeadFont; - -protected: - virtual void Paint(vcl::RenderContext& rRenderContext, const Rectangle& rRect) override; - -public: - ScHintWindow(vcl::Window* pParent, const OUString& rTit, const OUString& rMsg); -}; - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sc/source/ui/inc/overlayobject.hxx b/sc/source/ui/inc/overlayobject.hxx index 559a868ab412..64746bf874c9 100644 --- a/sc/source/ui/inc/overlayobject.hxx +++ b/sc/source/ui/inc/overlayobject.hxx @@ -21,6 +21,8 @@ #define INCLUDED_SC_SOURCE_UI_INC_OVERLAYOBJECT_HXX #include <svx/sdr/overlay/overlayobject.hxx> +#include <vcl/font.hxx> +#include <vcl/mapmod.hxx> class ScOverlayDashedBorder : public sdr::overlay::OverlayObject { @@ -40,23 +42,25 @@ private: bool mbToggle; }; -namespace vcl -{ - class Font; -} - class ScOverlayHint : public sdr::overlay::OverlayObject { public: ScOverlayHint(const OUString& rTit, const OUString& rMsg, const Color& rColor, const vcl::Font& rFont); + Size GetSizePixel() const; + void SetPos(const Point& rPos, const MapMode& rMode); public: virtual drawinglayer::primitive2d::Primitive2DContainer createOverlayObjectPrimitive2DSequence() override; private: + drawinglayer::primitive2d::Primitive2DContainer createOverlaySequence(sal_Int32 nLeft, sal_Int32 nTop, const MapMode &rMapMode, basegfx::B2DRange &rRange) const; + const OUString m_aTitle; const OUString m_aMessage; - const vcl::Font& m_rTextFont; + const vcl::Font m_aTextFont; + MapMode m_aMapMode; + sal_Int32 m_nLeft; + sal_Int32 m_nTop; }; #endif diff --git a/sc/source/ui/inc/tabview.hxx b/sc/source/ui/inc/tabview.hxx index 685de7d276df..c068063a80f3 100644 --- a/sc/source/ui/inc/tabview.hxx +++ b/sc/source/ui/inc/tabview.hxx @@ -48,7 +48,6 @@ class Splitter; class ScTabSplitter; class SdrView; class SdrObject; -class ScHintWindow; class ScPageBreakData; class SdrHdlList; class TabBar; @@ -116,7 +115,7 @@ private: VclPtr<ScCornerButton> aTopButton; VclPtr<ScrollBarBox> aScrollBarBox; - VclPtr<ScHintWindow> mpInputHintWindow; // popup window for data validation + std::unique_ptr<sdr::overlay::OverlayObjectList> mxInputHintOO; // help hint for data validation ScPageBreakData* pPageBreakData; std::vector<ScHighlightEntry> maHighlightRanges; |