[Libreoffice-commits] core.git: include/sfx2 include/svx include/vcl sfx2/source svtools/source svx/source sw/source vcl/source
Caolán McNamara (via logerrit)
logerrit at kemper.freedesktop.org
Thu Mar 11 17:35:05 UTC 2021
include/sfx2/ipclient.hxx | 3 ++-
include/sfx2/lokcharthelper.hxx | 3 ++-
include/sfx2/tbxctrl.hxx | 3 ++-
include/svx/AccessibleShapeTreeInfo.hxx | 3 ++-
include/svx/ImageMapInfo.hxx | 2 +-
include/vcl/vclenum.hxx | 13 +++++++++++++
include/vcl/waitobj.hxx | 9 ++-------
include/vcl/window.hxx | 13 -------------
sfx2/source/doc/objxtor.cxx | 1 -
sfx2/source/view/userinputinterception.cxx | 2 --
sfx2/source/view/viewfrm2.cxx | 1 -
svtools/source/misc/langhelp.cxx | 1 -
svtools/source/table/mousefunction.cxx | 2 --
svx/source/sdr/misc/ImageMapInfo.cxx | 12 ++++++------
svx/source/table/accessiblecell.cxx | 1 +
sw/source/core/access/accdoc.hxx | 1 +
vcl/source/window/window3.cxx | 7 +++++++
17 files changed, 39 insertions(+), 38 deletions(-)
New commits:
commit 071df4770dfe421d96d3df748af751eaae6982c3
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Wed Mar 10 20:48:37 2021 +0000
Commit: Caolán McNamara <caolanm at redhat.com>
CommitDate: Thu Mar 11 18:34:17 2021 +0100
use some forward declares to reduce includes
Change-Id: Ic3a6d9a9569f909a7480d9da09709dbd60259e97
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112323
Tested-by: Caolán McNamara <caolanm at redhat.com>
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/include/sfx2/ipclient.hxx b/include/sfx2/ipclient.hxx
index 438807a0020d..180f67b54588 100644
--- a/include/sfx2/ipclient.hxx
+++ b/include/sfx2/ipclient.hxx
@@ -26,11 +26,12 @@
#include <tools/gen.hxx>
-#include <vcl/window.hxx>
#include <vcl/errcode.hxx>
+#include <vcl/vclptr.hxx>
namespace com::sun::star::embed { class XEmbeddedObject; }
namespace com::sun::star::uno { template <typename > class Reference; }
+namespace vcl { class Window; }
class SfxInPlaceClient_Impl;
class SfxViewShell;
diff --git a/include/sfx2/lokcharthelper.hxx b/include/sfx2/lokcharthelper.hxx
index 020abad111f0..319af8c35da5 100644
--- a/include/sfx2/lokcharthelper.hxx
+++ b/include/sfx2/lokcharthelper.hxx
@@ -12,10 +12,11 @@
#include <sfx2/dllapi.h>
#include <tools/gen.hxx>
-#include <vcl/window.hxx>
+#include <vcl/vclptr.hxx>
namespace com::sun::star::frame { class XController; }
namespace com::sun::star::frame { class XDispatch; }
+namespace vcl { class Window; }
class SfxViewShell;
class VirtualDevice;
diff --git a/include/sfx2/tbxctrl.hxx b/include/sfx2/tbxctrl.hxx
index 65d44088629e..7150d64adbcf 100644
--- a/include/sfx2/tbxctrl.hxx
+++ b/include/sfx2/tbxctrl.hxx
@@ -25,11 +25,12 @@
#include <sal/types.h>
#include <svl/poolitem.hxx>
#include <svtools/toolboxcontroller.hxx>
-#include <vcl/window.hxx>
#include <rtl/ref.hxx>
+#include <vcl/vclptr.hxx>
namespace com::sun::star::frame { class XDispatchProvider; }
namespace com::sun::star::frame { class XFrame; }
+namespace vcl { class Window; }
class InterimItemWindow;
class SfxToolBoxControl;
diff --git a/include/svx/AccessibleShapeTreeInfo.hxx b/include/svx/AccessibleShapeTreeInfo.hxx
index f9da042b63d8..f50061ad47f4 100644
--- a/include/svx/AccessibleShapeTreeInfo.hxx
+++ b/include/svx/AccessibleShapeTreeInfo.hxx
@@ -22,13 +22,14 @@
#include <com/sun/star/uno/Reference.hxx>
#include <svx/svxdllapi.h>
-#include <vcl/window.hxx>
+#include <vcl/vclptr.hxx>
namespace com::sun::star {
namespace accessibility { class XAccessibleComponent; }
namespace document { class XShapeEventBroadcaster; }
namespace frame { class XController; }
}
+namespace vcl { class Window; }
class SdrView;
diff --git a/include/svx/ImageMapInfo.hxx b/include/svx/ImageMapInfo.hxx
index 7cd8f4f1780a..0e12df24dd6d 100644
--- a/include/svx/ImageMapInfo.hxx
+++ b/include/svx/ImageMapInfo.hxx
@@ -49,7 +49,7 @@ public:
static SvxIMapInfo* GetIMapInfo(const SdrObject* pObject);
static IMapObject* GetHitIMapObject(const SdrObject* pObj, const Point& rWinPoint,
- const vcl::Window* rCmpWnd = nullptr);
+ const OutputDevice* pCmpWnd = nullptr);
};
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/vcl/vclenum.hxx b/include/vcl/vclenum.hxx
index 251b5bdba1ea..d0c56ea43090 100644
--- a/include/vcl/vclenum.hxx
+++ b/include/vcl/vclenum.hxx
@@ -387,6 +387,19 @@ namespace o3tl
template<> struct typed_flags<FloatWinPopupFlags> : is_typed_flags<FloatWinPopupFlags, 0x0fff> {};
}
+// Flags for Window::Show()
+enum class ShowFlags
+{
+ NONE = 0x0000,
+ NoFocusChange = 0x0002,
+ NoActivate = 0x0004,
+ ForegroundTask = 0x0008,
+};
+namespace o3tl
+{
+ template<> struct typed_flags<ShowFlags> : is_typed_flags<ShowFlags, 0x000e> {};
+}
+
#endif // INCLUDED_VCL_VCLENUM_HXX
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/vcl/waitobj.hxx b/include/vcl/waitobj.hxx
index 682153a1e892..cd6b0c5cfe95 100644
--- a/include/vcl/waitobj.hxx
+++ b/include/vcl/waitobj.hxx
@@ -33,13 +33,8 @@ class VCL_DLLPUBLIC WaitObject
private:
VclPtr<vcl::Window> mpWindow;
public:
- WaitObject( vcl::Window* pWindow )
- {
- mpWindow = pWindow;
- if ( mpWindow )
- mpWindow->EnterWait();
- }
- ~WaitObject();
+ WaitObject(vcl::Window* pWindow);
+ ~WaitObject();
};
class VCL_DLLPUBLIC TopLevelWindowLocker
diff --git a/include/vcl/window.hxx b/include/vcl/window.hxx
index 51d6a7767c86..000d64ffcb4a 100644
--- a/include/vcl/window.hxx
+++ b/include/vcl/window.hxx
@@ -155,19 +155,6 @@ namespace o3tl
template<> struct typed_flags<PosSizeFlags> : is_typed_flags<PosSizeFlags, 0x000f> {};
}
-// Flags for Show()
-enum class ShowFlags
-{
- NONE = 0x0000,
- NoFocusChange = 0x0002,
- NoActivate = 0x0004,
- ForegroundTask = 0x0008,
-};
-namespace o3tl
-{
- template<> struct typed_flags<ShowFlags> : is_typed_flags<ShowFlags, 0x000e> {};
-}
-
// Flags for SetZOrder()
enum class ZOrderFlags
{
diff --git a/sfx2/source/doc/objxtor.cxx b/sfx2/source/doc/objxtor.cxx
index 7dc904433d1c..e5de957a4202 100644
--- a/sfx2/source/doc/objxtor.cxx
+++ b/sfx2/source/doc/objxtor.cxx
@@ -35,7 +35,6 @@
#include <sal/log.hxx>
#include <vcl/weld.hxx>
#include <vcl/svapp.hxx>
-#include <vcl/window.hxx>
#include <svl/eitem.hxx>
#include <basic/sbstar.hxx>
#include <svl/stritem.hxx>
diff --git a/sfx2/source/view/userinputinterception.cxx b/sfx2/source/view/userinputinterception.cxx
index b1cb6e8544ed..6e3f3c875e6c 100644
--- a/sfx2/source/view/userinputinterception.cxx
+++ b/sfx2/source/view/userinputinterception.cxx
@@ -33,10 +33,8 @@
#include <comphelper/interfacecontainer2.hxx>
#include <cppuhelper/weak.hxx>
#include <vcl/event.hxx>
-#include <vcl/window.hxx>
#include <osl/diagnose.h>
-
namespace sfx2
{
diff --git a/sfx2/source/view/viewfrm2.cxx b/sfx2/source/view/viewfrm2.cxx
index facdd8d5d9c4..ac2bf3411497 100644
--- a/sfx2/source/view/viewfrm2.cxx
+++ b/sfx2/source/view/viewfrm2.cxx
@@ -43,7 +43,6 @@
#include <svl/eitem.hxx>
#include <svl/stritem.hxx>
#include <tools/urlobj.hxx>
-#include <vcl/window.hxx>
using namespace ::com::sun::star;
using namespace ::com::sun::star::uno;
diff --git a/svtools/source/misc/langhelp.cxx b/svtools/source/misc/langhelp.cxx
index acaf2c6e24f3..92171ea6bc99 100644
--- a/svtools/source/misc/langhelp.cxx
+++ b/svtools/source/misc/langhelp.cxx
@@ -23,7 +23,6 @@
#include <vcl/idle.hxx>
#include <vcl/svapp.hxx>
#include <vcl/settings.hxx>
-#include <vcl/window.hxx>
#include <config_langs.h>
#include <config_vendor.h>
diff --git a/svtools/source/table/mousefunction.cxx b/svtools/source/table/mousefunction.cxx
index 6675e67e8cd3..a62af9fcc149 100644
--- a/svtools/source/table/mousefunction.cxx
+++ b/svtools/source/table/mousefunction.cxx
@@ -23,10 +23,8 @@
#include <table/tablesort.hxx>
#include <tools/diagnose_ex.h>
-#include <vcl/window.hxx>
#include <vcl/ptrstyle.hxx>
-
namespace svt::table
{
diff --git a/svx/source/sdr/misc/ImageMapInfo.cxx b/svx/source/sdr/misc/ImageMapInfo.cxx
index 8612357fdc99..c50fb2fcc30d 100644
--- a/svx/source/sdr/misc/ImageMapInfo.cxx
+++ b/svx/source/sdr/misc/ImageMapInfo.cxx
@@ -24,7 +24,7 @@
#include <svx/svdoole2.hxx>
#include <vcl/imapobj.hxx>
#include <vcl/svapp.hxx>
-#include <vcl/window.hxx>
+#include <vcl/outdev.hxx>
SvxIMapInfo* SvxIMapInfo::GetIMapInfo(SdrObject const* pObject)
{
@@ -47,7 +47,7 @@ SvxIMapInfo* SvxIMapInfo::GetIMapInfo(SdrObject const* pObject)
}
IMapObject* SvxIMapInfo::GetHitIMapObject(const SdrObject* pObj, const Point& rWinPoint,
- const vcl::Window* rCmpWnd)
+ const OutputDevice* pCmpWnd)
{
SvxIMapInfo* pIMapInfo = GetIMapInfo(pObj);
IMapObject* pIMapObj = nullptr;
@@ -60,11 +60,11 @@ IMapObject* SvxIMapInfo::GetHitIMapObject(const SdrObject* pObj, const Point& rW
ImageMap& rImageMap = const_cast<ImageMap&>(pIMapInfo->GetImageMap());
tools::Rectangle& rRect = const_cast<tools::Rectangle&>(pObj->GetLogicRect());
- if (rCmpWnd)
+ if (pCmpWnd)
{
- MapMode aWndMode = rCmpWnd->GetMapMode();
- aRelPoint = rCmpWnd->LogicToLogic(rWinPoint, &aWndMode, &aMap100);
- rRect = rCmpWnd->LogicToLogic(pObj->GetLogicRect(), &aWndMode, &aMap100);
+ MapMode aWndMode = pCmpWnd->GetMapMode();
+ aRelPoint = pCmpWnd->LogicToLogic(rWinPoint, &aWndMode, &aMap100);
+ rRect = pCmpWnd->LogicToLogic(pObj->GetLogicRect(), &aWndMode, &aMap100);
}
bool bObjSupported = false;
diff --git a/svx/source/table/accessiblecell.cxx b/svx/source/table/accessiblecell.cxx
index 39f520fed028..3ea43a4032a0 100644
--- a/svx/source/table/accessiblecell.cxx
+++ b/svx/source/table/accessiblecell.cxx
@@ -31,6 +31,7 @@
#include <editeng/unoedsrc.hxx>
#include <vcl/svapp.hxx>
+#include <vcl/window.hxx>
#include <unotools/accessiblestatesethelper.hxx>
#include <comphelper/string.hxx>
diff --git a/sw/source/core/access/accdoc.hxx b/sw/source/core/access/accdoc.hxx
index 452a62a3310c..15d65eb92e01 100644
--- a/sw/source/core/access/accdoc.hxx
+++ b/sw/source/core/access/accdoc.hxx
@@ -23,6 +23,7 @@
#include <com/sun/star/accessibility/XAccessibleSelection.hpp>
#include <com/sun/star/accessibility/XAccessibleExtendedAttributes.hpp>
#include "accselectionhelper.hxx"
+#include <vcl/window.hxx>
// base class for SwAccessibleDocument (in this same header file) and
// SwAccessiblePreview
diff --git a/vcl/source/window/window3.cxx b/vcl/source/window/window3.cxx
index 2410f4bbd4a6..a4ebb21e1ae6 100644
--- a/vcl/source/window/window3.cxx
+++ b/vcl/source/window/window3.cxx
@@ -22,6 +22,13 @@
#include <window.h>
#include <vcl/cursor.hxx>
+WaitObject::WaitObject(vcl::Window* pWindow)
+ : mpWindow(pWindow)
+{
+ if (mpWindow)
+ mpWindow->EnterWait();
+}
+
WaitObject::~WaitObject()
{
if (mpWindow)
More information about the Libreoffice-commits
mailing list