diff options
author | Noel Grandin <noelgrandin@gmail.com> | 2020-03-17 21:34:21 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-03-18 09:49:50 +0100 |
commit | e5230535877e30c3b874495e8794faa3a42d8017 (patch) | |
tree | 6678613797f3cfa80a08455a4080ce9e653f9781 /vcl | |
parent | 673728c9caf7b3199dd684f48a32a0f5cafd6285 (diff) |
simplify ORefVector code
by making it extend std::vector - it wants to be a ref-counted vector,
so let it be, and we can simplify the usage sites
Change-Id: I93ff6ee1522da965e16223dca171401d36fd67b7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90664
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/inc/osx/salframe.h | 2 | ||||
-rw-r--r-- | vcl/inc/salframe.hxx | 4 | ||||
-rw-r--r-- | vcl/osx/salframe.cxx | 9 | ||||
-rw-r--r-- | vcl/source/window/dialog.cxx | 3 |
4 files changed, 18 insertions, 0 deletions
diff --git a/vcl/inc/osx/salframe.h b/vcl/inc/osx/salframe.h index 2fcdef3609e9..4e32f806c33e 100644 --- a/vcl/inc/osx/salframe.h +++ b/vcl/inc/osx/salframe.h @@ -161,6 +161,8 @@ public: void UpdateFrameGeometry(); + virtual void BeginSheet(SalFrame* pSheetFrame) const override; + // trigger painting of the window void SendPaintEvent( const tools::Rectangle* pRect = nullptr ); diff --git a/vcl/inc/salframe.hxx b/vcl/inc/salframe.hxx index b83138e29d40..bc1127d1989b 100644 --- a/vcl/inc/salframe.hxx +++ b/vcl/inc/salframe.hxx @@ -259,6 +259,10 @@ public: return false; } + /** only does anything on MACOSX where it indicates to the OS that this window is a modal-dialog + * and should be displayed using the special sheet mode */ + virtual void BeginSheet(SalFrame* /*pSheetWindow*/) const {} + // return true to indicate tooltips are shown natively, false otherwise virtual bool ShowTooltip(const OUString& /*rHelpText*/, const tools::Rectangle& /*rHelpArea*/) { diff --git a/vcl/osx/salframe.cxx b/vcl/osx/salframe.cxx index 9539fb26401d..aafafe7a0c6c 100644 --- a/vcl/osx/salframe.cxx +++ b/vcl/osx/salframe.cxx @@ -1808,4 +1808,13 @@ void AquaSalFrame::EndSetClipRegion() // shadow is invalidated when view gets drawn again } +void AquaSalFrame::BeginSheet(SalFrame* pSheetFrame) const +{ + NSWindow* pSheetNSWindow = static_cast<AquaSalFrame*>(pSheetFrame)->mpNSWindow; +// [mpNSWindow beginSheet:pSheetNSWindow]; +// beginSheet(mpNSWindow]; + + [mpNSWindow beginSheet:pSheetNSWindow completionHandler:nil ]; +} + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/vcl/source/window/dialog.cxx b/vcl/source/window/dialog.cxx index ecc760625486..f83b0c3f02b8 100644 --- a/vcl/source/window/dialog.cxx +++ b/vcl/source/window/dialog.cxx @@ -965,6 +965,9 @@ bool Dialog::ImplStartExecute() // FIXME: no layouting, workaround some clipping issues ImplAdjustNWFSizes(); + if (mpDialogParent) + mpDialogParent->ImplGetFrame()->BeginSheet(ImplGetFrame()); // only does anything on macOS + css::uno::Reference< css::uno::XComponentContext > xContext( comphelper::getProcessComponentContext()); bool bForceFocusAndToFront(officecfg::Office::Common::View::NewDocumentHandling::ForceFocusAndToFront::get(xContext)); |