/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* * This file is part of the LibreOffice project. * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. * * This file incorporates work covered by the following license notice: * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed * with this work for additional information regarding copyright * ownership. The ASF licenses this file to you under the Apache * License, Version 2.0 (the "License"); you may not use this file * except in compliance with the License. You may obtain a copy of * the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
void OGenericUnoDialog::setFastPropertyValue_NoBroadcast( sal_Int32 nHandle, const Any& rValue )
{ // TODO: need some handling if we're currently executing ...
try
{
setPropertyValue(UNODIALOG_PROPERTY_TITLE, Any(_rTitle));
} catch(RuntimeException&)
{ // allowed to pass throw;
} catch( const Exception& )
{
DBG_UNHANDLED_EXCEPTION("svtools.uno"); // not allowed to pass
}
}
bool OGenericUnoDialog::impl_ensureDialog_lck()
{ if (m_xDialog) returntrue;
// get the parameters for the dialog from the current settings
// the title
OUString sTitle = m_sTitle;
auto xDialog(createDialog(m_xParent));
OSL_ENSURE(xDialog, "OGenericUnoDialog::impl_ensureDialog_lck: createDialog returned nonsense!"); if (!xDialog) returnfalse;
// do some initialisations if (!m_bTitleAmbiguous)
xDialog->set_title(sTitle);
m_xDialog = std::move(xDialog);
returntrue;
}
sal_Int16 SAL_CALL OGenericUnoDialog::execute()
{ // both creation and execution of the dialog must be guarded with the SolarMutex, so be generous here
SolarMutexGuard aSolarGuard;
// create the dialog, if necessary
{
UnoDialogEntryGuard aGuard( *this );
if (m_bExecuting) throw RuntimeException(
u"already executing the dialog (recursive call)"_ustr,
*this
);
m_bExecuting = true;
if ( !impl_ensureDialog_lck() ) return 0;
}
// start execution
sal_Int16 nReturn(0); if (m_xDialog)
nReturn = m_xDialog->run();
{
::osl::MutexGuard aGuard(m_aMutex);
// get the settings of the dialog
executedDialog( nReturn );
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.