Kaydet (Commit) a8622c77 authored tarafından Noel Grandin's avatar Noel Grandin

loplugin:flatten in sdext..stoc

Change-Id: I460e813e20a691c53738373376d3363f553bbab2
Reviewed-on: https://gerrit.libreoffice.org/42636Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarNoel Grandin <noel.grandin@collabora.co.uk>
üst 2684aefc
......@@ -143,86 +143,84 @@ void SAL_CALL PresenterPaneBase::initialize (const Sequence<Any>& rArguments)
static_cast<XWeak*>(this));
}
if (rArguments.getLength() == 5 || rArguments.getLength() == 6)
if (rArguments.getLength() != 5 && rArguments.getLength() != 6)
{
try
throw RuntimeException(
"PresenterSpritePane: invalid number of arguments",
static_cast<XWeak*>(this));
}
try
{
// Get the resource id from the first argument.
if ( ! (rArguments[0] >>= mxPaneId))
{
// Get the resource id from the first argument.
if ( ! (rArguments[0] >>= mxPaneId))
{
throw lang::IllegalArgumentException(
"PresenterPane: invalid pane id",
static_cast<XWeak*>(this),
0);
}
if ( ! (rArguments[1] >>= mxParentWindow))
{
throw lang::IllegalArgumentException(
"PresenterPane: invalid parent window",
static_cast<XWeak*>(this),
1);
}
Reference<rendering::XSpriteCanvas> xParentCanvas;
if ( ! (rArguments[2] >>= xParentCanvas))
{
throw lang::IllegalArgumentException(
"PresenterPane: invalid parent canvas",
static_cast<XWeak*>(this),
2);
}
if ( ! (rArguments[3] >>= msTitle))
{
throw lang::IllegalArgumentException(
"PresenterPane: invalid title",
static_cast<XWeak*>(this),
3);
}
if ( ! (rArguments[4] >>= mxBorderPainter))
{
throw lang::IllegalArgumentException(
"PresenterPane: invalid border painter",
static_cast<XWeak*>(this),
4);
}
bool bIsWindowVisibleOnCreation (true);
if (rArguments.getLength()>5 && ! (rArguments[5] >>= bIsWindowVisibleOnCreation))
{
throw lang::IllegalArgumentException(
"PresenterPane: invalid window visibility flag",
static_cast<XWeak*>(this),
5);
}
CreateWindows(mxParentWindow, bIsWindowVisibleOnCreation);
if (mxBorderWindow.is())
{
mxBorderWindow->addWindowListener(this);
mxBorderWindow->addPaintListener(this);
}
CreateCanvases(mxParentWindow, xParentCanvas);
// Raise new windows.
ToTop();
throw lang::IllegalArgumentException(
"PresenterPane: invalid pane id",
static_cast<XWeak*>(this),
0);
}
catch (Exception&)
if ( ! (rArguments[1] >>= mxParentWindow))
{
mxContentWindow = nullptr;
mxComponentContext = nullptr;
throw;
throw lang::IllegalArgumentException(
"PresenterPane: invalid parent window",
static_cast<XWeak*>(this),
1);
}
Reference<rendering::XSpriteCanvas> xParentCanvas;
if ( ! (rArguments[2] >>= xParentCanvas))
{
throw lang::IllegalArgumentException(
"PresenterPane: invalid parent canvas",
static_cast<XWeak*>(this),
2);
}
if ( ! (rArguments[3] >>= msTitle))
{
throw lang::IllegalArgumentException(
"PresenterPane: invalid title",
static_cast<XWeak*>(this),
3);
}
if ( ! (rArguments[4] >>= mxBorderPainter))
{
throw lang::IllegalArgumentException(
"PresenterPane: invalid border painter",
static_cast<XWeak*>(this),
4);
}
bool bIsWindowVisibleOnCreation (true);
if (rArguments.getLength()>5 && ! (rArguments[5] >>= bIsWindowVisibleOnCreation))
{
throw lang::IllegalArgumentException(
"PresenterPane: invalid window visibility flag",
static_cast<XWeak*>(this),
5);
}
CreateWindows(mxParentWindow, bIsWindowVisibleOnCreation);
if (mxBorderWindow.is())
{
mxBorderWindow->addWindowListener(this);
mxBorderWindow->addPaintListener(this);
}
CreateCanvases(mxParentWindow, xParentCanvas);
// Raise new windows.
ToTop();
}
else
catch (Exception&)
{
throw RuntimeException(
"PresenterSpritePane: invalid number of arguments",
static_cast<XWeak*>(this));
mxContentWindow = nullptr;
mxComponentContext = nullptr;
throw;
}
}
......
......@@ -430,54 +430,48 @@ void SAL_CALL PresenterProtocolHandler::Dispatch::dispatch(
static_cast<uno::XWeak*>(this));
}
if (rURL.Protocol == "vnd.org.libreoffice.presenterscreen:"
&& rURL.Path == msURLPath)
{
if (mpCommand.get() != nullptr)
mpCommand->Execute();
}
else
if (rURL.Protocol != "vnd.org.libreoffice.presenterscreen:"
|| rURL.Path != msURLPath)
{
// We can not throw an IllegalArgumentException
throw RuntimeException();
}
if (mpCommand.get() != nullptr)
mpCommand->Execute();
}
void SAL_CALL PresenterProtocolHandler::Dispatch::addStatusListener(
const css::uno::Reference<css::frame::XStatusListener>& rxListener,
const css::util::URL& rURL)
{
if (rURL.Path == msURLPath)
{
maStatusListenerContainer.push_back(rxListener);
frame::FeatureStateEvent aEvent;
aEvent.FeatureURL = rURL;
aEvent.IsEnabled = mpCommand->IsEnabled();
aEvent.Requery = false;
aEvent.State = mpCommand->GetState();
rxListener->statusChanged(aEvent);
}
else
if (rURL.Path != msURLPath)
throw RuntimeException();
maStatusListenerContainer.push_back(rxListener);
frame::FeatureStateEvent aEvent;
aEvent.FeatureURL = rURL;
aEvent.IsEnabled = mpCommand->IsEnabled();
aEvent.Requery = false;
aEvent.State = mpCommand->GetState();
rxListener->statusChanged(aEvent);
}
void SAL_CALL PresenterProtocolHandler::Dispatch::removeStatusListener (
const css::uno::Reference<css::frame::XStatusListener>& rxListener,
const css::util::URL& rURL)
{
if (rURL.Path == msURLPath)
{
StatusListenerContainer::iterator iListener (
::std::find(
maStatusListenerContainer.begin(),
maStatusListenerContainer.end(),
rxListener));
if (iListener != maStatusListenerContainer.end())
maStatusListenerContainer.erase(iListener);
}
else
if (rURL.Path != msURLPath)
throw RuntimeException();
StatusListenerContainer::iterator iListener (
::std::find(
maStatusListenerContainer.begin(),
maStatusListenerContainer.end(),
rxListener));
if (iListener != maStatusListenerContainer.end())
maStatusListenerContainer.erase(iListener);
}
//----- document::XEventListener ----------------------------------------------
......
......@@ -138,14 +138,12 @@ uno::Reference< accessibility::XAccessible > SAL_CALL ThumbnailViewAcc::getAcces
{
ThrowIfDisposed();
const SolarMutexGuard aSolarGuard;
uno::Reference< accessibility::XAccessible > xRet;
ThumbnailViewItem* pItem = getItem (sal::static_int_cast< sal_uInt16 >(i));
if( pItem )
xRet = pItem->GetAccessible( mbIsTransientChildrenDisabled );
else
if( !pItem )
throw lang::IndexOutOfBoundsException();
uno::Reference< accessibility::XAccessible > xRet = pItem->GetAccessible( mbIsTransientChildrenDisabled );
return xRet;
}
......@@ -414,12 +412,10 @@ void SAL_CALL ThumbnailViewAcc::selectAccessibleChild( sal_Int32 nChildIndex )
const SolarMutexGuard aSolarGuard;
ThumbnailViewItem* pItem = getItem (sal::static_int_cast< sal_uInt16 >(nChildIndex));
if(pItem != nullptr)
{
mpParent->SelectItem( pItem->mnId );
}
else
if(pItem == nullptr)
throw lang::IndexOutOfBoundsException();
mpParent->SelectItem( pItem->mnId );
}
sal_Bool SAL_CALL ThumbnailViewAcc::isAccessibleChildSelected( sal_Int32 nChildIndex )
......@@ -427,14 +423,11 @@ sal_Bool SAL_CALL ThumbnailViewAcc::isAccessibleChildSelected( sal_Int32 nChildI
ThrowIfDisposed();
const SolarMutexGuard aSolarGuard;
ThumbnailViewItem* pItem = getItem (sal::static_int_cast< sal_uInt16 >(nChildIndex));
bool bRet = false;
if (pItem != nullptr)
bRet = mpParent->IsItemSelected( pItem->mnId );
else
if (pItem == nullptr)
throw lang::IndexOutOfBoundsException();
return bRet;
return mpParent->IsItemSelected( pItem->mnId );
}
void SAL_CALL ThumbnailViewAcc::clearAccessibleSelection()
......
......@@ -1281,15 +1281,13 @@ void Metadatable::SetMetadataReference( const css::beans::StringPair & i_rRefere
IsInContent() ? s_content : s_styles );
}
XmlIdRegistry & rReg( dynamic_cast<XmlIdRegistry&>( GetRegistry() ) );
if (rReg.TryRegisterMetadatable(*this, streamName, i_rReference.Second))
{
m_pReg = &rReg;
}
else
if (!rReg.TryRegisterMetadatable(*this, streamName, i_rReference.Second))
{
throw lang::IllegalArgumentException(
"Metadatable::SetMetadataReference: argument is invalid", /*this*/nullptr, 0);
}
m_pReg = &rReg;
}
}
......
......@@ -1843,16 +1843,15 @@ SfxDocumentMetaData::storeToStorage(
xExp->setSourceDocument(css::uno::Reference<css::lang::XComponent>(this));
css::uno::Reference<css::document::XFilter> xFilter(xExp,
css::uno::UNO_QUERY_THROW);
if (xFilter->filter(css::uno::Sequence< css::beans::PropertyValue >())) {
css::uno::Reference<css::embed::XTransactedObject> xTransaction(
xStorage, css::uno::UNO_QUERY);
if (xTransaction.is()) {
xTransaction->commit();
}
} else {
if (!xFilter->filter(css::uno::Sequence< css::beans::PropertyValue >())) {
throw css::io::IOException(
"SfxDocumentMetaData::storeToStorage: cannot filter", *this);
}
css::uno::Reference<css::embed::XTransactedObject> xTransaction(
xStorage, css::uno::UNO_QUERY);
if (xTransaction.is()) {
xTransaction->commit();
}
}
void SAL_CALL
......@@ -1955,17 +1954,16 @@ void SAL_CALL SfxDocumentMetaData::initialize( const css::uno::Sequence< css::un
for (sal_Int32 i = 0; i < aArguments.getLength(); ++i) {
const css::uno::Any any = aArguments[i];
if (any >>= xDoc) {
if (!xDoc.is()) {
throw css::lang::IllegalArgumentException(
"SfxDocumentMetaData::initialize: argument is null",
*this, static_cast<sal_Int16>(i));
}
} else {
if (!(any >>= xDoc)) {
throw css::lang::IllegalArgumentException(
"SfxDocumentMetaData::initialize: argument must be XDocument",
*this, static_cast<sal_Int16>(i));
}
if (!xDoc.is()) {
throw css::lang::IllegalArgumentException(
"SfxDocumentMetaData::initialize: argument is null",
*this, static_cast<sal_Int16>(i));
}
}
if (!xDoc.is()) {
......
......@@ -613,15 +613,7 @@ bool ModelData_Impl::ExecuteFilterDialog_Impl( const OUString& aFilterName )
GetMediaDescr() >> aPropsForDialog;
xFilterProperties->setPropertyValues( aPropsForDialog );
if( xFilterDialog->execute() )
{
uno::Sequence< beans::PropertyValue > aPropsFromDialog =
xFilterProperties->getPropertyValues();
const sal_Int32 nPropsLen {aPropsFromDialog.getLength()};
for ( sal_Int32 nInd = 0; nInd < nPropsLen; ++nInd )
GetMediaDescr()[aPropsFromDialog[nInd].Name] = aPropsFromDialog[nInd].Value;
}
else
if( !xFilterDialog->execute() )
{
throw task::ErrorCodeIOException(
("ModelData_Impl::ExecuteFilterDialog_Impl:"
......@@ -629,6 +621,12 @@ bool ModelData_Impl::ExecuteFilterDialog_Impl( const OUString& aFilterName )
uno::Reference< uno::XInterface >(),
sal_uInt32(ERRCODE_IO_ABORT));
}
uno::Sequence< beans::PropertyValue > aPropsFromDialog =
xFilterProperties->getPropertyValues();
const sal_Int32 nPropsLen {aPropsFromDialog.getLength()};
for ( sal_Int32 nInd = 0; nInd < nPropsLen; ++nInd )
GetMediaDescr()[aPropsFromDialog[nInd].Name] = aPropsFromDialog[nInd].Value;
}
}
......
......@@ -622,15 +622,7 @@ void SfxObjectShell::ExecFile_Impl(SfxRequest &rReq)
SfxStoringHelper aHelper;
if ( QueryHiddenInformation( bIsPDFExport ? HiddenWarningFact::WhenCreatingPDF : HiddenWarningFact::WhenSaving, nullptr ) == RET_YES )
{
aHelper.GUIStoreModel( GetModel(),
OUString::createFromAscii( pSlot->GetUnoName() ),
aDispatchArgs,
bPreselectPassword,
GetDocumentSignatureState() );
}
else
if ( QueryHiddenInformation( bIsPDFExport ? HiddenWarningFact::WhenCreatingPDF : HiddenWarningFact::WhenSaving, nullptr ) != RET_YES )
{
// the user has decided not to store the document
throw task::ErrorCodeIOException(
......@@ -638,6 +630,13 @@ void SfxObjectShell::ExecFile_Impl(SfxRequest &rReq)
uno::Reference< uno::XInterface >(), sal_uInt32(ERRCODE_IO_ABORT));
}
aHelper.GUIStoreModel( GetModel(),
OUString::createFromAscii( pSlot->GetUnoName() ),
aDispatchArgs,
bPreselectPassword,
GetDocumentSignatureState() );
// merge aDispatchArgs to the request
SfxAllItemSet aResultParams( GetPool() );
TransformParameters( nId,
......
......@@ -698,7 +698,6 @@ void SAL_CALL SfxPrintHelper::print(const uno::Sequence< beans::PropertyValue >&
sal_Int32 nCopies = 0;
if ( !( rProp.Value >>= nCopies ) )
throw css::lang::IllegalArgumentException();
aCheckedArgs[nProps].Name = rProp.Name;
aCheckedArgs[nProps++].Value <<= nCopies;
}
......@@ -708,26 +707,20 @@ void SAL_CALL SfxPrintHelper::print(const uno::Sequence< beans::PropertyValue >&
else if ( rProp.Name == "Collate" || rProp.Name == "Sort" )
{
bool bTemp;
if ( rProp.Value >>= bTemp )
{
aCheckedArgs[nProps].Name = "Collate";
aCheckedArgs[nProps++].Value <<= bTemp;
}
else
if ( !(rProp.Value >>= bTemp) )
throw css::lang::IllegalArgumentException();
aCheckedArgs[nProps].Name = "Collate";
aCheckedArgs[nProps++].Value <<= bTemp;
}
// Pages-Property
else if ( rProp.Name == "Pages" )
{
OUString sTemp;
if( rProp.Value >>= sTemp )
{
aCheckedArgs[nProps].Name = rProp.Name;
aCheckedArgs[nProps++].Value <<= sTemp;
}
else
if( !(rProp.Value >>= sTemp) )
throw css::lang::IllegalArgumentException();
aCheckedArgs[nProps].Name = rProp.Name;
aCheckedArgs[nProps++].Value <<= sTemp;
}
// MonitorVisible
......
......@@ -38,17 +38,11 @@ uno::Any SAL_CALL SfxUnoDecks::getByName( const OUString& aName )
{
SolarMutexGuard aGuard;
uno::Any aRet;
if (hasByName(aName))
{
uno::Reference<ui::XDeck> xDeck = new SfxUnoDeck(xFrame, aName);
aRet <<= xDeck;
}
else
if (!hasByName(aName))
throw container::NoSuchElementException();
return aRet;
uno::Reference<ui::XDeck> xDeck = new SfxUnoDeck(xFrame, aName);
return uno::Any(xDeck);
}
......
......@@ -47,17 +47,11 @@ uno::Any SAL_CALL SfxUnoPanels::getByName( const OUString& aName )
{
SolarMutexGuard aGuard;
uno::Any aRet;
if (hasByName(aName))
{
uno::Reference<ui::XPanel> xPanel = new SfxUnoPanel(xFrame, aName, mDeckId);
aRet <<= xPanel;
}
else
if (!hasByName(aName))
throw container::NoSuchElementException();
return aRet;
uno::Reference<ui::XPanel> xPanel = new SfxUnoPanel(xFrame, aName, mDeckId);
return uno::Any(xPanel);
}
......
......@@ -50,37 +50,35 @@ recently_used_file::recently_used_file() :
osl::Security sec;
OUString homedir_url;
if (sec.getHomeDir(homedir_url))
{
OUString homedir;
osl::FileBase::getSystemPathFromFileURL(homedir_url, homedir);
OUString rufn = homedir;
ensure_final_slash(rufn);
rufn += ".recently-used";
OString tmp =
OUStringToOString(rufn, osl_getThreadTextEncoding());
int fd = open(tmp.getStr(), O_RDWR | O_CREAT, S_IRUSR | S_IWUSR);
if (fd != -1) {
file_ = fdopen(fd, "w+");
if (file_ == nullptr) {
close(fd);
}
}
if (!sec.getHomeDir(homedir_url))
throw "Cannot determine user home directory";
OUString homedir;
osl::FileBase::getSystemPathFromFileURL(homedir_url, homedir);
OUString rufn = homedir;
ensure_final_slash(rufn);
rufn += ".recently-used";
if (nullptr == file_)
throw "I/O error opening ~/.recently-used";
OString tmp =
OUStringToOString(rufn, osl_getThreadTextEncoding());
if (lockf(fileno(file_), F_LOCK, 0) != 0)
{
fclose(file_);
throw "Cannot lock ~/.recently-used";
int fd = open(tmp.getStr(), O_RDWR | O_CREAT, S_IRUSR | S_IWUSR);
if (fd != -1) {
file_ = fdopen(fd, "w+");
if (file_ == nullptr) {
close(fd);
}
}
else
throw "Cannot determine user home directory";
if (nullptr == file_)
throw "I/O error opening ~/.recently-used";
if (lockf(fileno(file_), F_LOCK, 0) != 0)
{
fclose(file_);
throw "Cannot lock ~/.recently-used";
}
}
......
......@@ -584,19 +584,17 @@ void SmModel::_setPropertyValues(const PropertyMapEntry** ppEntries, const Any*
if (pPrinter)
{
OUString sPrinterName;
if (*pValues >>= sPrinterName )
if ( !(*pValues >>= sPrinterName) )
throw IllegalArgumentException();
if ( !sPrinterName.isEmpty() )
{
if ( !sPrinterName.isEmpty() )
{
VclPtrInstance<SfxPrinter> pNewPrinter( std::unique_ptr<SfxItemSet>(pPrinter->GetOptions().Clone()), sPrinterName );
if (pNewPrinter->IsKnown())
pDocSh->SetPrinter ( pNewPrinter );
else
pNewPrinter.disposeAndClear();
}
VclPtrInstance<SfxPrinter> pNewPrinter( std::unique_ptr<SfxItemSet>(pPrinter->GetOptions().Clone()), sPrinterName );
if (pNewPrinter->IsKnown())
pDocSh->SetPrinter ( pNewPrinter );
else
pNewPrinter.disposeAndClear();
}
else
throw IllegalArgumentException();
}
}
}
......@@ -604,61 +602,57 @@ void SmModel::_setPropertyValues(const PropertyMapEntry** ppEntries, const Any*
case HANDLE_PRINTER_SETUP:
{
Sequence < sal_Int8 > aSequence;
if ( *pValues >>= aSequence )
{
sal_uInt32 nSize = aSequence.getLength();
SvMemoryStream aStream ( aSequence.getArray(), nSize, StreamMode::READ );
aStream.Seek ( STREAM_SEEK_TO_BEGIN );
static sal_uInt16 const nRange[] =
{
SID_PRINTSIZE, SID_PRINTSIZE,
SID_PRINTZOOM, SID_PRINTZOOM,
SID_PRINTTITLE, SID_PRINTTITLE,
SID_PRINTTEXT, SID_PRINTTEXT,
SID_PRINTFRAME, SID_PRINTFRAME,
SID_NO_RIGHT_SPACES, SID_NO_RIGHT_SPACES,
SID_SAVE_ONLY_USED_SYMBOLS, SID_SAVE_ONLY_USED_SYMBOLS,
SID_AUTO_CLOSE_BRACKETS, SID_AUTO_CLOSE_BRACKETS,
0
};
auto pItemSet = o3tl::make_unique<SfxItemSet>( SmDocShell::GetPool(), nRange );
SmModule *pp = SM_MOD();
pp->GetConfig()->ConfigToItemSet(*pItemSet);
VclPtr<SfxPrinter> pPrinter = SfxPrinter::Create ( aStream, std::move(pItemSet) );
pDocSh->SetPrinter( pPrinter );
}
else
if ( !(*pValues >>= aSequence) )
throw IllegalArgumentException();
sal_uInt32 nSize = aSequence.getLength();
SvMemoryStream aStream ( aSequence.getArray(), nSize, StreamMode::READ );
aStream.Seek ( STREAM_SEEK_TO_BEGIN );
static sal_uInt16 const nRange[] =
{
SID_PRINTSIZE, SID_PRINTSIZE,
SID_PRINTZOOM, SID_PRINTZOOM,
SID_PRINTTITLE, SID_PRINTTITLE,
SID_PRINTTEXT, SID_PRINTTEXT,
SID_PRINTFRAME, SID_PRINTFRAME,
SID_NO_RIGHT_SPACES, SID_NO_RIGHT_SPACES,
SID_SAVE_ONLY_USED_SYMBOLS, SID_SAVE_ONLY_USED_SYMBOLS,
SID_AUTO_CLOSE_BRACKETS, SID_AUTO_CLOSE_BRACKETS,
0
};
auto pItemSet = o3tl::make_unique<SfxItemSet>( SmDocShell::GetPool(), nRange );
SmModule *pp = SM_MOD();
pp->GetConfig()->ConfigToItemSet(*pItemSet);
VclPtr<SfxPrinter> pPrinter = SfxPrinter::Create ( aStream, std::move(pItemSet) );
pDocSh->SetPrinter( pPrinter );
}
break;
case HANDLE_SYMBOLS:
{
// this is set
Sequence < SymbolDescriptor > aSequence;
if ( *pValues >>= aSequence )
if ( !(*pValues >>= aSequence) )
throw IllegalArgumentException();
sal_uInt32 nSize = aSequence.getLength();
SmModule *pp = SM_MOD();
SmSymbolManager &rManager = pp->GetSymbolManager();
SymbolDescriptor *pDescriptor = aSequence.getArray();
for (sal_uInt32 i = 0; i < nSize ; i++, pDescriptor++)
{
sal_uInt32 nSize = aSequence.getLength();
SmModule *pp = SM_MOD();
SmSymbolManager &rManager = pp->GetSymbolManager();
SymbolDescriptor *pDescriptor = aSequence.getArray();
for (sal_uInt32 i = 0; i < nSize ; i++, pDescriptor++)
{
vcl::Font aFont;
aFont.SetFamilyName ( pDescriptor->sFontName );
aFont.SetCharSet ( static_cast < rtl_TextEncoding > (pDescriptor->nCharSet) );
aFont.SetFamily ( static_cast < FontFamily > (pDescriptor->nFamily ) );
aFont.SetPitch ( static_cast < FontPitch > (pDescriptor->nPitch ) );
aFont.SetWeight ( static_cast < FontWeight > (pDescriptor->nWeight ) );
aFont.SetItalic ( static_cast < FontItalic > (pDescriptor->nItalic ) );
SmSym aSymbol ( pDescriptor->sName, aFont, static_cast < sal_Unicode > (pDescriptor->nCharacter),
pDescriptor->sSymbolSet );
aSymbol.SetExportName ( pDescriptor->sExportName );
rManager.AddOrReplaceSymbol ( aSymbol );
}
vcl::Font aFont;
aFont.SetFamilyName ( pDescriptor->sFontName );
aFont.SetCharSet ( static_cast < rtl_TextEncoding > (pDescriptor->nCharSet) );
aFont.SetFamily ( static_cast < FontFamily > (pDescriptor->nFamily ) );
aFont.SetPitch ( static_cast < FontPitch > (pDescriptor->nPitch ) );
aFont.SetWeight ( static_cast < FontWeight > (pDescriptor->nWeight ) );
aFont.SetItalic ( static_cast < FontItalic > (pDescriptor->nItalic ) );
SmSym aSymbol ( pDescriptor->sName, aFont, static_cast < sal_Unicode > (pDescriptor->nCharacter),
pDescriptor->sSymbolSet );
aSymbol.SetExportName ( pDescriptor->sExportName );
rManager.AddOrReplaceSymbol ( aSymbol );