LibreOffice Module sfx2 (master) 1
frame.cxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
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/.
8 *
9 * This file incorporates work covered by the following license notice:
10 *
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 .
18 */
19
20#include <com/sun/star/uno/Reference.h>
21#include <com/sun/star/awt/XTopWindow.hpp>
22#include <com/sun/star/awt/XWindow.hpp>
23#include <com/sun/star/util/XCloseable.hpp>
24#include <com/sun/star/util/CloseVetoException.hpp>
25#include <com/sun/star/lang/DisposedException.hpp>
26#include <com/sun/star/container/XChild.hpp>
27#include <com/sun/star/embed/XEmbeddedObject.hpp>
28
29#include <svl/intitem.hxx>
30#include <svl/stritem.hxx>
31#include <tools/svborder.hxx>
33
34#include <appdata.hxx>
35#include <sfx2/app.hxx>
36#include <sfx2/event.hxx>
37#include <sfx2/frame.hxx>
38#include <sfx2/objsh.hxx>
39#include <sfx2/dispatch.hxx>
40#include <sfx2/docfile.hxx>
41#include <sfx2/docfilt.hxx>
42#include <sfx2/frmdescr.hxx>
43#include <sfx2/sfxsids.hrc>
44#include <sfx2/viewsh.hxx>
45#include <sfx2/viewfrm.hxx>
46#include "impframe.hxx"
47#include <utility>
48#include <workwin.hxx>
49#include <sfx2/ipclient.hxx>
50#include <vector>
51
52using namespace com::sun::star;
53
54static std::vector<SfxFrame*> gaFramesArr_Impl;
55
56using namespace ::com::sun::star::uno;
57using namespace ::com::sun::star::util;
58using namespace ::com::sun::star::frame;
59using namespace ::com::sun::star::container;
60
62{
63 return new SfxUnoAnyItem(0, uno::Any());
64}
65
67{
68 return new SfxUnoFrameItem();
69}
71{
72 m_pImpl.reset(new SfxFrame_Impl);
73 gaFramesArr_Impl.push_back( this );
74}
75
76
78{
79 RemoveTopFrame_Impl( this );
81
82 auto it = std::find( gaFramesArr_Impl.begin(), gaFramesArr_Impl.end(), this );
83 if ( it != gaFramesArr_Impl.end() )
84 gaFramesArr_Impl.erase( it );
85
86 delete m_pImpl->pDescr;
87}
88
90{
91 // Actually, one more PrepareClose is still needed!
92 bool bRet = false;
93 if ( !m_pImpl->bClosing )
94 {
95 m_pImpl->bClosing = true;
97
98 // now close frame; it will be deleted if this call is successful, so don't use any members after that!
99 bRet = true;
100 try
101 {
102 Reference< XCloseable > xCloseable ( m_pImpl->xFrame, UNO_QUERY );
103 if (xCloseable.is())
104 xCloseable->close(true);
105 else if ( m_pImpl->xFrame.is() )
106 {
107 Reference < XFrame > xFrame = m_pImpl->xFrame;
108 xFrame->setComponent( Reference < css::awt::XWindow >(), Reference < XController >() );
109 xFrame->dispose();
110 }
111 else
112 DoClose_Impl();
113 }
114 catch( css::util::CloseVetoException& )
115 {
116 m_pImpl->bClosing = false;
117 bRet = false;
118 }
119 catch( css::lang::DisposedException& )
120 {
121 }
122 }
123
124 return bRet;
125}
126
128{
129 SfxBindings* pBindings = nullptr;
130 if ( m_pImpl->pCurrentViewFrame )
131 pBindings = &m_pImpl->pCurrentViewFrame->GetBindings();
132
133 // For internal tasks Controllers and Tools must be cleared
134 if ( m_pImpl->pWorkWin )
135 m_pImpl->pWorkWin->DeleteControllers_Impl();
136
137 if ( m_pImpl->pCurrentViewFrame )
138 m_pImpl->pCurrentViewFrame->Close();
139
140 if ( m_pImpl->bOwnsBindings )
141 {
142 delete pBindings;
143 pBindings = nullptr;
144 }
145
146 delete this;
147}
148
150{
151 return m_pImpl->pCurrentViewFrame && m_pImpl->pCurrentViewFrame->GetObjectShell() &&
152 m_pImpl->pCurrentViewFrame->GetObjectShell()->IsModified();
153}
154
156{
157 bool bRet = true;
158
159 // prevent recursive calls
160 if( !m_pImpl->bPrepClosing )
161 {
162 m_pImpl->bPrepClosing = true;
163
165 if( pCur )
166 {
167 // SFX components have a known behaviour
168 // First check if this frame is the only view to its current document
169 bool bOther = false;
170 for ( const SfxViewFrame *pFrame = SfxViewFrame::GetFirst( pCur );
171 !bOther && pFrame; pFrame = SfxViewFrame::GetNext( *pFrame, pCur ) )
172 {
173 bOther = ( &pFrame->GetFrame() != this );
174 }
175
177
178 if ( bOther )
179 // if there are other views only the current view of this frame must be asked
181 else
182 // otherwise ask the document
183 bRet = pCur->PrepareClose( bUI );
184 }
185
186 m_pImpl->bPrepClosing = false;
187 }
188
189 if ( bRet && m_pImpl->pWorkWin )
190 // if closing was accepted by the component the UI subframes must be asked also
191 bRet = m_pImpl->pWorkWin->PrepareClose_Impl();
192
193 return bRet;
194}
195
196
198{
199 return m_pImpl->bClosing;
200}
201
203{
204 m_pImpl->bClosing = true;
205}
206
208{
209 if( m_pImpl->bInCancelTransfers )
210 return;
211
212 m_pImpl->bInCancelTransfers = true;
214 if( pObj ) //&& !( pObj->Get_Impl()->nLoadedFlags & SfxLoadedFlags::ALL ))
215 {
216 SfxViewFrame* pFrm;
217 for( pFrm = SfxViewFrame::GetFirst( pObj );
218 pFrm && &pFrm->GetFrame() == this;
219 pFrm = SfxViewFrame::GetNext( *pFrm, pObj ) ) ;
220 // No more Frame in Document -> Cancel
221 if( !pFrm )
222 {
223 pObj->CancelTransfers();
224 GetCurrentDocument()->Broadcast( SfxHint(SfxHintId::TitleChanged) );
225 }
226 }
227
228 // Check if StarOne-Loader should be canceled
229 SfxFrameWeakRef wFrame( this );
230 if (wFrame.is())
231 m_pImpl->bInCancelTransfers = false;
232}
233
235{
236 return m_pImpl->pCurrentViewFrame;
237}
238
240{
241 // Its own Document is locked?
242 const SfxObjectShell* pObjSh = GetCurrentDocument();
243 if ( !pObjSh || !pObjSh->IsAutoLoadLocked() )
244 return false;
245
246 // otherwise allow AutoLoad
247 return true;
248}
249
251{
252 return m_pImpl->pCurrentViewFrame ?
253 m_pImpl->pCurrentViewFrame->GetObjectShell() :
254 nullptr;
255}
256
258{
259 m_pImpl->pCurrentViewFrame = pFrame;
260}
261
263{
264 return m_pImpl->mbHasTitle;
265}
266
268{
269 m_pImpl->mbHasTitle = n;
270}
271
273{
274 // Update all modifiable data between load and unload, the
275 // fixed data is only processed once (after PrepareForDoc_Impl in
276 // updateDescriptor) to save time.
277
278 SfxViewFrame* pViewFrame = GetCurrentViewFrame();
279 if( pViewFrame && pViewFrame->GetViewShell() )
280 {
281 SfxItemSet *pSet = GetDescriptor()->GetArgs();
282 if ( GetController().is() && pSet->GetItemState( SID_VIEW_DATA ) != SfxItemState::SET )
283 {
284 css::uno::Any aData = GetController()->getViewData();
285 pSet->Put( SfxUnoAnyItem( SID_VIEW_DATA, aData ) );
286 }
287
288 if ( pViewFrame->GetCurViewId() )
289 pSet->Put( SfxUInt16Item( SID_VIEW_ID, static_cast<sal_uInt16>(pViewFrame->GetCurViewId()) ) );
290 }
291}
292
294{
295 // For PrepareForDoc_Impl frames, the descriptor of the updated
296 // and new itemset to be initialized. All data fir restoring the view
297 // are thus saved. If the document be replaced, GetViewData_Impl (so)
298 // the latest information hinzugef by "added. All together then the
299 // browser-history saved in. When you activate such frame pick entry
300 // is complete itemsets and the descriptor in the OpenDoc sent;.
301 // Here only the fixed properties identified "other adjustable, the
302 // retrieved by GetViewData (saves time).
303
304 assert(pDoc && "NULL-Document inserted ?!");
305
306 const SfxMedium *pMed = pDoc->GetMedium();
308
309 // Mark FileOpen parameter
310 SfxItemSet& rItemSet = pMed->GetItemSet();
311
312 const std::shared_ptr<const SfxFilter>& pFilter = pMed->GetFilter();
313 OUString aFilter;
314 if ( pFilter )
315 aFilter = pFilter->GetFilterName();
316
317 const SfxStringItem* pRefererItem = rItemSet.GetItem<SfxStringItem>(SID_REFERER, false);
318 const SfxStringItem* pOptionsItem = rItemSet.GetItem<SfxStringItem>(SID_FILE_FILTEROPTIONS, false);
319 const SfxStringItem* pTitle1Item = rItemSet.GetItem<SfxStringItem>(SID_DOCINFO_TITLE, false);
320
321 SfxItemSet *pSet = GetDescriptor()->GetArgs();
322
323 // Delete all old Items
324 pSet->ClearItem();
325
326 if ( pRefererItem )
327 pSet->Put( *pRefererItem );
328 else
329 pSet->Put( SfxStringItem( SID_REFERER, OUString() ) );
330
331 if ( pOptionsItem )
332 pSet->Put( *pOptionsItem );
333
334 if ( pTitle1Item )
335 pSet->Put( *pTitle1Item );
336
337 pSet->Put( SfxStringItem( SID_FILTER_NAME, aFilter ));
338}
339
340
342{
343 // Create a FrameDescriptor On Demand; if there is no TopLevel-Frame
344 // will result in an error, as no valid link is created.
345
346 if ( !m_pImpl->pDescr )
347 {
348 DBG_ASSERT( true, "No TopLevel-Frame, but no Descriptor!" );
349 m_pImpl->pDescr = new SfxFrameDescriptor;
350 if ( GetCurrentDocument() )
351 m_pImpl->pDescr->SetURL( GetCurrentDocument()->GetMedium()->GetOrigURL() );
352 }
353 return m_pImpl->pDescr;
354}
355
357{
358 // An empty string for 'No Target'
359 rList.emplace_back( );
360 rList.emplace_back( "_top" );
361 rList.emplace_back( "_parent" );
362 rList.emplace_back( "_blank" );
363 rList.emplace_back( "_self" );
364}
365
367{
368 auto& rArr = SfxGetpApp()->Get_Impl()->vTopFrames;
369 rArr.push_back( pFrame );
370}
371
373{
374 auto& rArr = SfxGetpApp()->Get_Impl()->vTopFrames;
375 auto it = std::find( rArr.begin(), rArr.end(), pFrame );
376 if ( it != rArr.end() )
377 rArr.erase( it );
378}
379
380SfxFrameItem::SfxFrameItem( sal_uInt16 nWhichId, SfxViewFrame const *p )
381 : SfxPoolItem( nWhichId ), pFrame( p ? &p->GetFrame() : nullptr )
382{
383 wFrame = pFrame;
384}
385
386SfxFrameItem::SfxFrameItem( sal_uInt16 nWhichId, SfxFrame *p ):
387 SfxPoolItem( nWhichId ),
388 pFrame( p ), wFrame( p )
389{
390}
391
393 SfxPoolItem( 0 ),
394 pFrame( p ), wFrame( p )
395{
396}
397
398bool SfxFrameItem::operator==( const SfxPoolItem &rItem ) const
399{
400 return SfxPoolItem::operator==(rItem) &&
401 static_cast<const SfxFrameItem&>(rItem).pFrame == pFrame &&
402 static_cast<const SfxFrameItem&>(rItem).wFrame == wFrame;
403}
404
406{
407 SfxFrameItem* pNew = new SfxFrameItem( wFrame);
408 pNew->pFrame = pFrame;
409 return pNew;
410}
411
412bool SfxFrameItem::QueryValue( css::uno::Any& rVal, sal_uInt8 ) const
413{
414 if ( wFrame )
415 {
416 rVal <<= wFrame->GetFrameInterface();
417 return true;
418 }
419
420 return false;
421}
422
423bool SfxFrameItem::PutValue( const css::uno::Any& rVal, sal_uInt8 )
424{
425 Reference < XFrame > xFrame;
426 if ( (rVal >>= xFrame) && xFrame.is() )
427 {
429 while ( pFr )
430 {
431 if ( pFr->GetFrameInterface() == xFrame )
432 {
433 wFrame = pFrame = pFr;
434 return true;
435 }
436
437 pFr = SfxFrame::GetNext( *pFr );
438 }
439 return true;
440 }
441
442 return false;
443}
444
445
446SfxUnoAnyItem::SfxUnoAnyItem( sal_uInt16 nWhichId, const css::uno::Any& rAny )
447 : SfxPoolItem( nWhichId )
448{
449 aValue = rAny;
450}
451
452bool SfxUnoAnyItem::operator==( const SfxPoolItem& rItem ) const
453{
454 assert(SfxPoolItem::operator==(rItem)); (void)rItem;
455 return false;
456}
457
459{
460 return new SfxUnoAnyItem( *this );
461}
462
463bool SfxUnoAnyItem::QueryValue( css::uno::Any& rVal, sal_uInt8 /*nMemberId*/ ) const
464{
465 rVal = aValue;
466 return true;
467}
468
469bool SfxUnoAnyItem::PutValue( const css::uno::Any& rVal, sal_uInt8 /*nMemberId*/ )
470{
471 aValue = rVal;
472 return true;
473}
474
476{
477}
478
479SfxUnoFrameItem::SfxUnoFrameItem( sal_uInt16 nWhichId, css::uno::Reference< css::frame::XFrame > i_xFrame )
480 : SfxPoolItem( nWhichId )
481 , m_xFrame(std::move( i_xFrame ))
482{
483}
484
485bool SfxUnoFrameItem::operator==( const SfxPoolItem& i_rItem ) const
486{
487 return SfxPoolItem::operator==(i_rItem) &&
488 static_cast< const SfxUnoFrameItem& >( i_rItem ).m_xFrame == m_xFrame;
489}
490
492{
493 return new SfxUnoFrameItem( *this );
494}
495
496bool SfxUnoFrameItem::QueryValue( css::uno::Any& rVal, sal_uInt8 /*nMemberId*/ ) const
497{
498 rVal <<= m_xFrame;
499 return true;
500}
501
502bool SfxUnoFrameItem::PutValue( const css::uno::Any& rVal, sal_uInt8 /*nMemberId*/ )
503{
504 return ( rVal >>= m_xFrame );
505}
506
507css::uno::Reference< css::frame::XController > SfxFrame::GetController() const
508{
509 if ( m_pImpl->pCurrentViewFrame && m_pImpl->pCurrentViewFrame->GetViewShell() )
510 return m_pImpl->pCurrentViewFrame->GetViewShell()->GetController();
511 else
512 return css::uno::Reference< css::frame::XController > ();
513}
514
515const css::uno::Reference< css::frame::XFrame >& SfxFrame::GetFrameInterface() const
516{
517 return m_pImpl->xFrame;
518}
519
520void SfxFrame::SetFrameInterface_Impl( const css::uno::Reference< css::frame::XFrame >& rFrame )
521{
522 m_pImpl->xFrame = rFrame;
523 css::uno::Reference< css::frame::XDispatchRecorder > xRecorder;
524 if ( !rFrame.is() && GetCurrentViewFrame() )
526}
527
529{
530 if ( GetCurrentViewFrame() )
531 {
533 GetWindow().Show();
534 m_pImpl->xFrame->getContainerWindow()->setVisible( true );
535 Reference < css::awt::XTopWindow > xTopWindow( m_pImpl->xFrame->getContainerWindow(), UNO_QUERY );
536 if ( xTopWindow.is() )
537 xTopWindow->toFront();
538 }
539}
540
542{
543 Appear();
544 if ( GetCurrentViewFrame() )
546}
547
549{
550 m_pImpl->bOwnsBindings = bSet;
551}
552
554{
555 return m_pImpl->bOwnsBindings;
556}
557
559{
560 m_pImpl->aBorder = rBorder;
562 if ( !pF )
563 return;
564
565 Point aPos ( rBorder.Left(), rBorder.Top() );
566 Size aSize( GetWindow().GetOutputSizePixel() );
567 tools::Long nDeltaX = rBorder.Left() + rBorder.Right();
568 if ( aSize.Width() > nDeltaX )
569 aSize.AdjustWidth( -nDeltaX );
570 else
571 aSize.setWidth( 0 );
572
573 tools::Long nDeltaY = rBorder.Top() + rBorder.Bottom();
574 if ( aSize.Height() > nDeltaY )
575 aSize.AdjustHeight( -nDeltaY );
576 else
577 aSize.setHeight( 0 );
578
579 pF->GetWindow().SetPosSizePixel( aPos, aSize );
580}
581
583{
584 Size aSize( GetWindow().GetOutputSizePixel() );
585 return tools::Rectangle( Point(), aSize );
586}
587
589{
590 return m_pImpl->pWorkWin;
591}
592
594{
595 SfxFrame* pFrame = this;
596
597 if ( IsInPlace() )
598 {
599 // this makes sense only for inplace activated objects
600 try
601 {
602 Reference < XChild > xChild( GetCurrentDocument()->GetModel(), UNO_QUERY );
603 if ( xChild.is() )
604 {
605 Reference < XModel > xParent( xChild->getParent(), UNO_QUERY );
606 if ( xParent.is() )
607 {
608 Reference< XController > xParentCtrler = xParent->getCurrentController();
609 if ( xParentCtrler.is() )
610 {
611 Reference < XFrame > xFrame( xParentCtrler->getFrame() );
613 while ( pFr )
614 {
615 if ( pFr->GetFrameInterface() == xFrame )
616 {
617 pFrame = pFr;
618 break;
619 }
620
621 pFr = SfxFrame::GetNext( *pFr );
622 }
623 }
624 }
625 }
626 }
627 catch(Exception&)
628 {
629 TOOLS_WARN_EXCEPTION( "sfx.view", "SfxFrame::CreateWorkWindow_Impl: Exception caught. Please try to submit a reproducible bug!");
630 }
631 }
632
633 m_pImpl->pWorkWin = new SfxWorkWindow( &pFrame->GetWindow(), this, pFrame );
634}
635
637{
638 if ( m_pImpl->bReleasingComponent )
639 {
641 return;
642 }
643
644 vcl::Window* pFocusWindow = &GetWindow();
645 if ( GetCurrentViewFrame() && GetCurrentViewFrame()->GetViewShell() && GetCurrentViewFrame()->GetViewShell()->GetWindow() )
646 pFocusWindow = GetCurrentViewFrame()->GetViewShell()->GetWindow();
647
648 if( !pFocusWindow->HasChildPathFocus() )
649 pFocusWindow->GrabFocus();
650}
651
653{
654 m_pImpl->bReleasingComponent = true;
655}
656
658{
659 return m_pImpl->bInPlace;
660}
661
663{
664 if ( IsClosing_Impl() )
665 return;
666
667 if ( OwnsBindings_Impl() )
668 {
669 if ( IsInPlace() )
670 {
672 }
673 else
674 {
675 // check for IPClient that contains UIactive object or object that is currently UI activating
678 if ( pClient )
679 {
680 SfxObjectShell* pDoc
681 = SfxObjectShell::GetShellFromComponent(pClient->GetObject()->getComponent());
682 SfxViewFrame* pFrame = SfxViewFrame::GetFirst(pDoc);
683 pWork = pFrame ? pFrame->GetFrame().GetWorkWindow_Impl() : nullptr;
684 }
685
686 if ( pWork )
687 {
688 pWork->ArrangeChildren_Impl();
689 pWork->ShowChildren_Impl();
690 }
691
692 // problem in presence of UIActive object: when the window is resized, but the toolspace border
693 // remains the same, setting the toolspace border at the ContainerEnvironment doesn't force a
694 // resize on the IPEnvironment; without that no resize is called for the SfxViewFrame. So always
695 // set the window size of the SfxViewFrame explicit.
697 }
698 }
699 else if ( m_pImpl->pCurrentViewFrame )
700 {
701 m_pImpl->pCurrentViewFrame->GetWindow().SetSizePixel( GetWindow().GetOutputSizePixel() );
702 }
703
704}
705
707{
708 return gaFramesArr_Impl.empty() ? nullptr : gaFramesArr_Impl.front();
709}
710
712{
713 auto it = std::find( gaFramesArr_Impl.begin(), gaFramesArr_Impl.end(), &rFrame );
714 if ( it != gaFramesArr_Impl.end() && (++it) != gaFramesArr_Impl.end() )
715 return *it;
716 else
717 return nullptr;
718}
719
720/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
css::uno::Reference< css::lang::XComponent > m_xFrame
SfxApplication * SfxGetpApp()
Definition: app.hxx:231
static OUString GetEventName(GlobalEventId nID)
std::vector< SfxFrame * > vTopFrames
Definition: appdata.hxx:74
SAL_DLLPRIVATE SfxAppData_Impl * Get_Impl() const
Definition: app.hxx:169
void NotifyEvent(const SfxEventHint &rEvent, bool bSynchron=true)
Definition: appcfg.cxx:338
SAL_DLLPRIVATE void SetRecorder_Impl(css::uno::Reference< css::frame::XDispatchRecorder > const &)
Definition: bindings.cxx:1739
void Broadcast(const SfxHint &rHint)
SAL_DLLPRIVATE void Update_Impl(bool bForce=false)
Definition: dispatch.cxx:1034
SfxItemSet * GetArgs()
Definition: frmdescr.cxx:38
virtual bool PutValue(const css::uno::Any &rVal, sal_uInt8 nMemberId) override
Definition: frame.cxx:423
virtual SfxFrameItem * Clone(SfxItemPool *pPool=nullptr) const override
Definition: frame.cxx:405
virtual bool operator==(const SfxPoolItem &) const override
Definition: frame.cxx:398
SfxFrameWeakRef wFrame
Definition: frame.hxx:152
SfxFrameItem(sal_uInt16 nWhich, SfxViewFrame const *p)
Definition: frame.cxx:380
virtual bool QueryValue(css::uno::Any &rVal, sal_uInt8 nMemberId=0) const override
Definition: frame.cxx:412
SfxFrame * pFrame
Definition: frame.hxx:151
void Appear()
Definition: frame.cxx:528
SAL_DLLPRIVATE void SetOwnsBindings_Impl(bool bSet)
Definition: frame.cxx:548
SAL_DLLPRIVATE void GetViewData_Impl()
Definition: frame.cxx:272
SAL_DLLPRIVATE void CreateWorkWindow_Impl()
Definition: frame.cxx:593
static SAL_DLLPRIVATE void RemoveTopFrame_Impl(SfxFrame *pFrame)
Definition: frame.cxx:372
const css::uno::Reference< css::frame::XFrame > & GetFrameInterface() const
Definition: frame.cxx:515
SAL_DLLPRIVATE void GrabFocusOnComponent_Impl()
Definition: frame.cxx:636
SAL_DLLPRIVATE void SetIsClosing_Impl()
Definition: frame.cxx:202
SAL_DLLPRIVATE tools::Rectangle GetTopOuterRectPixel_Impl() const
Definition: frame.cxx:582
VclPtr< vcl::Window > m_pWindow
Definition: frame.hxx:73
void Resize()
Definition: frame.cxx:662
bool IsClosing_Impl() const
Definition: frame.cxx:197
SAL_DLLPRIVATE void SetFrameInterface_Impl(const css::uno::Reference< css::frame::XFrame > &rFrame)
Definition: frame.cxx:520
void UpdateDescriptor(SfxObjectShell const *pDoc)
Definition: frame.cxx:293
SAL_DLLPRIVATE void SetHasTitle(bool)
Definition: frame.cxx:267
SAL_DLLPRIVATE void ReleasingComponent_Impl()
Definition: frame.cxx:652
SAL_DLLPRIVATE bool DocIsModified_Impl()
Definition: frame.cxx:149
SAL_DLLPRIVATE void DoClose_Impl()
Definition: frame.cxx:127
bool GetHasTitle() const
Definition: frame.cxx:262
SAL_DLLPRIVATE SfxWorkWindow * GetWorkWindow_Impl() const
Definition: frame.cxx:588
SAL_DLLPRIVATE bool IsAutoLoadLocked_Impl() const
Definition: frame.cxx:239
SAL_DLLPRIVATE void Construct_Impl()
Definition: frame.cxx:70
virtual ~SfxFrame()
Definition: frame.cxx:77
void AppearWithUpdate()
Definition: frame.cxx:541
SAL_DLLPRIVATE SfxFrameDescriptor * GetDescriptor() const
Definition: frame.cxx:341
static SAL_DLLPRIVATE void InsertTopFrame_Impl(SfxFrame *pFrame)
Definition: frame.cxx:366
std::unique_ptr< SfxFrame_Impl > m_pImpl
Definition: frame.hxx:72
SAL_DLLPRIVATE void SetCurrentViewFrame_Impl(SfxViewFrame *)
Definition: frame.cxx:257
SAL_WARN_UNUSED_RESULT SfxObjectShell * GetCurrentDocument() const
Definition: frame.cxx:250
void CancelTransfers()
Definition: frame.cxx:207
static SAL_WARN_UNUSED_RESULT SfxFrame * GetNext(SfxFrame &)
Definition: frame.cxx:711
bool IsInPlace() const
Definition: frame.cxx:657
SAL_DLLPRIVATE void SetToolSpaceBorderPixel_Impl(const SvBorder &)
Definition: frame.cxx:558
static void GetDefaultTargetList(TargetList &)
Definition: frame.cxx:356
bool DoClose()
Definition: frame.cxx:89
css::uno::Reference< css::frame::XController > GetController() const
Definition: frame.cxx:507
static SAL_WARN_UNUSED_RESULT SfxFrame * GetFirst()
Definition: frame.cxx:706
vcl::Window & GetWindow() const
Definition: frame.hxx:85
SAL_WARN_UNUSED_RESULT SfxViewFrame * GetCurrentViewFrame() const
Definition: frame.cxx:234
SAL_DLLPRIVATE bool PrepareClose_Impl(bool bUI)
Definition: frame.cxx:155
SAL_DLLPRIVATE bool OwnsBindings_Impl() const
Definition: frame.cxx:553
const css::uno::Reference< css::embed::XEmbeddedObject > & GetObject() const
Definition: ipclient.cxx:700
sal_uInt16 ClearItem(sal_uInt16 nWhich=0)
SfxItemState GetItemState(sal_uInt16 nWhich, bool bSrchInParent=true, const SfxPoolItem **ppItem=nullptr) const
const SfxPoolItem * GetItem(sal_uInt16 nWhich, bool bSearchInParent=true) const
const SfxPoolItem * Put(const SfxPoolItem &rItem, sal_uInt16 nWhich)
const std::shared_ptr< const SfxFilter > & GetFilter() const
Definition: docfile.cxx:3111
SfxItemSet & GetItemSet() const
Definition: docfile.cxx:3647
virtual bool PrepareClose(bool bUI=true)
Definition: objxtor.cxx:506
virtual void CancelTransfers()
Definition: objmisc.cxx:1264
bool IsAutoLoadLocked() const
Definition: objmisc.cxx:927
static SfxObjectShell * GetShellFromComponent(const css::uno::Reference< css::uno::XInterface > &xComp)
Definition: objxtor.cxx:1039
SfxMedium * GetMedium() const
Definition: objsh.hxx:261
virtual bool operator==(const SfxPoolItem &) const=0
SfxViewShell * GetViewShell() const
Returns the SfxViewShell in which they are located in the subshells.
Definition: shell.cxx:129
SfxUnoAnyItem(sal_uInt16 nWhich, const css::uno::Any &rAny)
Definition: frame.cxx:446
virtual bool operator==(const SfxPoolItem &) const override
Definition: frame.cxx:452
virtual SfxUnoAnyItem * Clone(SfxItemPool *pPool=nullptr) const override
Definition: frame.cxx:458
static SfxPoolItem * CreateDefault()
Definition: frame.cxx:61
css::uno::Any aValue
Definition: frame.hxx:171
virtual bool QueryValue(css::uno::Any &rVal, sal_uInt8 nMemberId=0) const override
Definition: frame.cxx:463
virtual bool PutValue(const css::uno::Any &rVal, sal_uInt8 nMemberId) override
Definition: frame.cxx:469
virtual bool operator==(const SfxPoolItem &) const override
Definition: frame.cxx:485
css::uno::Reference< css::frame::XFrame > m_xFrame
Definition: frame.hxx:186
virtual bool PutValue(const css::uno::Any &rVal, sal_uInt8 nMemberId) override
Definition: frame.cxx:502
static SfxPoolItem * CreateDefault()
Definition: frame.cxx:66
virtual SfxUnoFrameItem * Clone(SfxItemPool *pPool=nullptr) const override
Definition: frame.cxx:491
virtual bool QueryValue(css::uno::Any &rVal, sal_uInt8 nMemberId=0) const override
Definition: frame.cxx:496
vcl::Window & GetWindow() const
Definition: viewfrm.cxx:2792
SfxBindings & GetBindings()
Definition: viewfrm.hxx:110
SfxInterfaceId GetCurViewId() const
Definition: viewfrm.cxx:2547
static SAL_WARN_UNUSED_RESULT SfxViewFrame * GetNext(const SfxViewFrame &rPrev, const SfxObjectShell *pDoc=nullptr, bool bOnlyVisible=true)
Definition: viewfrm.cxx:2006
SfxDispatcher * GetDispatcher()
Definition: viewfrm.hxx:109
static SAL_WARN_UNUSED_RESULT SfxViewFrame * GetFirst(const SfxObjectShell *pDoc=nullptr, bool bOnlyVisible=true)
Definition: viewfrm.cxx:1983
SfxFrame & GetFrame() const
Definition: viewfrm.cxx:2782
void Show()
Definition: viewfrm.cxx:2135
virtual bool PrepareClose(bool bUI=true)
Initialize is called after the frame has been loaded and the controller has been set.
Definition: viewsh.cxx:1817
vcl::Window * GetWindow() const
Definition: viewsh.hxx:272
SAL_DLLPRIVATE SfxInPlaceClient * GetUIActiveIPClient_Impl() const
Definition: viewsh.cxx:1500
void ArrangeChildren_Impl(bool bForce=true)
Definition: workwin.cxx:654
void ShowChildren_Impl()
Definition: workwin.cxx:961
constexpr tools::Long Height() const
tools::Long AdjustHeight(tools::Long n)
void setWidth(tools::Long nWidth)
tools::Long AdjustWidth(tools::Long n)
void setHeight(tools::Long nHeight)
constexpr tools::Long Width() const
tools::Long & Left()
tools::Long & Top()
tools::Long & Right()
tools::Long & Bottom()
bool is() const
void disposeAndClear()
bool HasChildPathFocus(bool bSystemWindow=false) const
void GrabFocus()
void Show(bool bVisible=true, ShowFlags nFlags=ShowFlags::NONE)
virtual void SetPosSizePixel(const Point &rNewPos, const Size &rNewSize)
#define DBG_ASSERT(sCon, aError)
#define TOOLS_WARN_EXCEPTION(area, stream)
static std::vector< SfxFrame * > gaFramesArr_Impl
Definition: frame.cxx:54
::std::vector< OUString > TargetList
void * p
sal_Int64 n
DdeData aData
Definition: lnkbase2.cxx:82
@ Exception
long Long
Reference< XFrame > xFrame
unsigned char sal_uInt8