fix baseline build (old cairo) - 'cairo_rectangle_int_t' does not name a type
[LibreOffice.git] / sc / source / ui / view / tabvwshd.cxx
blobde13fc68b63c479f22f3da50474bf9b81fa765d2
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
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/.
9 * This file incorporates work covered by the following license notice:
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 .
20 #include <sfx2/childwin.hxx>
21 #include <sfx2/request.hxx>
22 #include <sfx2/viewfrm.hxx>
23 #include <vcl/svapp.hxx>
24 #include <vcl/wrkwin.hxx>
26 #include "tabvwsh.hxx"
27 #include "global.hxx"
28 #include "scmod.hxx"
29 #include "docsh.hxx"
30 #include "sc.hrc"
31 #include <gridwin.hxx>
33 // STATIC DATA -----------------------------------------------------------
35 //! Parent-Window fuer Dialoge
36 //! Problem: OLE Server!
38 vcl::Window* ScTabViewShell::GetDialogParent()
40 // if a ref-input dialog is open, use it as parent
41 // (necessary when a slot is executed from the dialog's OK handler)
42 if ( nCurRefDlgId && nCurRefDlgId == SC_MOD()->GetCurRefDlgId() )
44 SfxViewFrame* pViewFrm = GetViewFrame();
45 if ( pViewFrm->HasChildWindow(nCurRefDlgId) )
47 SfxChildWindow* pChild = pViewFrm->GetChildWindow(nCurRefDlgId);
48 if (pChild)
50 vcl::Window* pWin = pChild->GetWindow();
51 if (pWin && pWin->IsVisible())
52 return pWin;
57 ScDocShell* pDocSh = GetViewData().GetDocShell();
58 if ( pDocSh->IsOle() )
60 // TODO/LATER: how to GetEditWindow in embedded document?!
61 // It should be OK to return the ViewShell Window!
62 return GetWindow();
63 // SvInPlaceEnvironment* pEnv = pDocSh->GetIPEnv();
64 // if (pEnv)
65 // return pEnv->GetEditWin();
68 return GetActiveWin(); // for normal views, too
71 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */