static rtl::Reference<VCLXWindow> CreateXWindow( vcl::Window const * pWindow )
{ switch ( pWindow->GetType() )
{ case WindowType::IMAGEBUTTON: case WindowType::SPINBUTTON: case WindowType::MENUBUTTON: case WindowType::MOREBUTTON: case WindowType::PUSHBUTTON: case WindowType::HELPBUTTON: case WindowType::OKBUTTON: case WindowType::CANCELBUTTON: returnnew VCLXButton; case WindowType::CHECKBOX: returnnew VCLXCheckBox; // #i95042# // A Window of type <MetricBox> is inherited from type <ComboBox>. // Thus, it does make more sense to return a <VCLXComboBox> instance // instead of only a <VCLXWindow> instance, especially regarding its // corresponding accessibility API. case WindowType::METRICBOX: case WindowType::COMBOBOX: returnnew VCLXComboBox; case WindowType::FORMATTEDFIELD: returnnew SVTXNumericField; case WindowType::SPINFIELD: case WindowType::CURRENCYFIELD: returnnew VCLXNumericField; case WindowType::DATEFIELD: returnnew VCLXDateField; case WindowType::MULTILINEEDIT: case WindowType::EDIT: returnnew VCLXEdit; case WindowType::METRICFIELD: returnnew VCLXSpinField; case WindowType::MESSBOX: case WindowType::INFOBOX: case WindowType::WARNINGBOX: case WindowType::QUERYBOX: case WindowType::ERRORBOX: returnnew VCLXMessageBox; case WindowType::FIXEDIMAGE: returnnew VCLXImageControl; case WindowType::FIXEDTEXT: returnnew VCLXFixedText; case WindowType::MULTILISTBOX: case WindowType::LISTBOX: returnnew VCLXListBox; case WindowType::DIALOG: case WindowType::TABDIALOG: case WindowType::BUTTONDIALOG: case WindowType::MODELESSDIALOG: returnnew VCLXDialog; case WindowType::PATTERNFIELD: returnnew VCLXPatternField; case WindowType::RADIOBUTTON: returnnew VCLXRadioButton; case WindowType::SCROLLBAR: returnnew VCLXScrollBar; case WindowType::TIMEFIELD: returnnew VCLXTimeField;
case WindowType::WORKWINDOW: case WindowType::DOCKINGWINDOW: case WindowType::FLOATINGWINDOW: case WindowType::HELPTEXTWINDOW: returnnew VCLXTopWindow;
case WindowType::WINDOW: case WindowType::TABPAGE: returnnew VCLXContainer; case WindowType::TABCONTROL: returnnew VCLXMultiPage;
case WindowType::BORDERWINDOW:
{ if (pWindow->IsNativeFrame()) returnnew VCLXTopWindow; returnnew VCLXWindow(true);
}
// case WindowType::FIXEDLINE: // case WindowType::FIXEDBITMAP: // case WindowType::DATEBOX: // case WindowType::GROUPBOX: // case WindowType::LONGCURRENCYBOX: // case WindowType::SPLITTER: // case WindowType::STATUSBAR: // case WindowType::TABCONTROL: // case WindowType::NUMERICBOX: // case WindowType::TRISTATEBOX: // case WindowType::TIMEBOX: // case WindowType::SPLITWINDOW: // case WindowType::SCROLLBARBOX: // case WindowType::PATTERNBOX: // case WindowType::CURRENCYBOX: case WindowType::HEADERBAR: case WindowType::TOOLBOX: default: returnnew VCLXWindow( true );
}
}
void UnoWrapper::WindowDestroyed( vcl::Window* pWindow )
{ // their still might be some children created with css::loader::Java // that would otherwise not be destroyed until the garbage collector cleans up
VclPtr< vcl::Window > pChild = pWindow->GetWindow( GetWindowType::FirstChild ); while ( pChild )
{
VclPtr< vcl::Window > pNextChild = pChild->GetWindow( GetWindowType::Next );
VclPtr< vcl::Window > pClient = pChild->GetWindow( GetWindowType::Client ); if ( pClient && pClient->GetWindowPeer() )
{
css::uno::Reference< css::lang::XComponent > xComp = pClient->GetComponentInterface( false );
xComp->dispose();
} else
{ // We need it to dispose the child windows properly (even without window peer), // otherwise the vcl::Window will be leaked.
pClient.disposeAndClear();
}
// #102132# Iterate over frames after setting Window peer to NULL, // because while destroying other frames, we get into the method again and try // to destroy this window again... // #i42462#/#116855# no, don't loop: Instead, just ensure that all our top-window-children // are disposed, too (which should also be a valid fix for #102132#, but doesn't have the extreme // performance penalties)
VclPtr< vcl::Window > pTopWindowChild = pWindow->GetWindow( GetWindowType::FirstTopWindowChild ); while ( pTopWindowChild )
{
OSL_ENSURE( pTopWindowChild->GetParent() == pWindow, "UnoWrapper::WindowDestroyed: inconsistency in the SystemWindow relationship!" );
¤ 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.10Bemerkung:
(vorverarbeitet am 2026-10-01)
¤
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.