SfxFrame::~SfxFrame()
{
RemoveTopFrame_Impl( this );
m_pWindow.disposeAndClear();
auto it = std::find( gaFramesArr_Impl.begin(), gaFramesArr_Impl.end(), this ); if ( it != gaFramesArr_Impl.end() )
gaFramesArr_Impl.erase( it );
delete m_pImpl->pDescr;
}
bool SfxFrame::DoClose()
{ // Actually, one more PrepareClose is still needed! bool bRet = false; if ( !m_pImpl->bClosing )
{
m_pImpl->bClosing = true;
CancelTransfers();
// now close frame; it will be deleted if this call is successful, so don't use any members after that!
bRet = true; try
{
Reference< XCloseable > xCloseable ( m_pImpl->xFrame, UNO_QUERY ); if (xCloseable.is())
xCloseable->close(true); elseif ( m_pImpl->xFrame.is() )
{
Reference < XFrame > xFrame = m_pImpl->xFrame;
xFrame->setComponent( Reference < css::awt::XWindow >(), Reference < XController >() );
xFrame->dispose();
} else
DoClose_Impl();
} catch( css::util::CloseVetoException& )
{
m_pImpl->bClosing = false;
bRet = false;
} catch( css::lang::DisposedException& )
{
}
}
SfxObjectShell* pCur = GetCurrentDocument() ; if( pCur )
{ // SFX components have a known behaviour // First check if this frame is the only view to its current document bool bOther = false; for ( const SfxViewFrame *pFrame = SfxViewFrame::GetFirst( pCur );
!bOther && pFrame; pFrame = SfxViewFrame::GetNext( *pFrame, pCur ) )
{
bOther = ( &pFrame->GetFrame() != this );
}
if ( bOther ) // if there are other views only the current view of this frame must be asked
bRet = GetCurrentViewFrame()->GetViewShell()->PrepareClose( bUI ); else // otherwise ask the document
bRet = pCur->PrepareClose( bUI );
}
m_pImpl->bPrepClosing = false;
}
if ( bRet && m_pImpl->pWorkWin ) // if closing was accepted by the component the UI subframes must be asked also
bRet = m_pImpl->pWorkWin->PrepareClose_Impl();
void SfxFrame::SetHasTitle( bool n )
{
m_pImpl->mbHasTitle = n;
}
void SfxFrame::GetViewData_Impl()
{ // Update all modifiable data between load and unload, the // fixed data is only processed once (after PrepareForDoc_Impl in // updateDescriptor) to save time.
void SfxFrame::UpdateDescriptor( SfxObjectShell const *pDoc )
{ // For PrepareForDoc_Impl frames, the descriptor of the updated // and new itemset to be initialized. All data fir restoring the view // are thus saved. If the document be replaced, GetViewData_Impl (so) // the latest information hinzugef by "added. All together then the // browser-history saved in. When you activate such frame pick entry // is complete itemsets and the descriptor in the OpenDoc sent;. // Here only the fixed properties identified "other adjustable, the // retrieved by GetViewData (saves time).
SfxFrameDescriptor* SfxFrame::GetDescriptor() const
{ // Create a FrameDescriptor On Demand; if there is no TopLevel-Frame // will result in an error, as no valid link is created.
if ( !m_pImpl->pDescr )
{
DBG_ASSERT( true, "No TopLevel-Frame, but no Descriptor!" );
m_pImpl->pDescr = new SfxFrameDescriptor; if ( GetCurrentDocument() )
m_pImpl->pDescr->SetURL( GetCurrentDocument()->GetMedium()->GetOrigURL() );
} return m_pImpl->pDescr;
}
SfxFrameItem* SfxFrameItem::Clone( SfxItemPool *) const
{ // Every ::Clone implementation *needs* to also ensure that // the WhichID gets set/copied at the created Item (!)
SfxFrameItem* pNew = new SfxFrameItem(Which(), wFrame);
pNew->pFrame = pFrame; return pNew;
}
void SfxFrame::Resize()
{ if ( IsClosing_Impl() ) return;
if ( OwnsBindings_Impl() )
{ if ( IsInPlace() )
{
SetToolSpaceBorderPixel_Impl( SvBorder() );
} else
{ // check for IPClient that contains UIactive object or object that is currently UI activating
SfxWorkWindow *pWork = GetWorkWindow_Impl();
SfxInPlaceClient* pClient = GetCurrentViewFrame()->GetViewShell() ? GetCurrentViewFrame()->GetViewShell()->GetUIActiveIPClient_Impl() : nullptr; if ( pClient )
{
SfxObjectShell* pDoc
= SfxObjectShell::GetShellFromComponent(pClient->GetObject()->getComponent());
SfxViewFrame* pFrame = SfxViewFrame::GetFirst(pDoc);
pWork = pFrame ? pFrame->GetFrame().GetWorkWindow_Impl() : nullptr;
}
if ( pWork )
{
pWork->ArrangeChildren_Impl();
pWork->ShowChildren_Impl();
}
// problem in presence of UIActive object: when the window is resized, but the toolspace border // remains the same, setting the toolspace border at the ContainerEnvironment doesn't force a // resize on the IPEnvironment; without that no resize is called for the SfxViewFrame. So always // set the window size of the SfxViewFrame explicit.
SetToolSpaceBorderPixel_Impl( m_pImpl->aBorder );
}
} elseif ( m_pImpl->pCurrentViewFrame )
{
m_pImpl->pCurrentViewFrame->GetWindow().SetSizePixel( GetWindow().GetOutputSizePixel() );
}
¤ Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.0.13Bemerkung:
(Wie Sie bei der Firma Beratungs- und Dienstleistungen beauftragen können 2026-09-29)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.