diff options
Diffstat (limited to 'sfx2/source/doc/Metadatable.cxx')
-rw-r--r-- | sfx2/source/doc/Metadatable.cxx | 53 |
1 files changed, 21 insertions, 32 deletions
diff --git a/sfx2/source/doc/Metadatable.cxx b/sfx2/source/doc/Metadatable.cxx index f77883555c..6f2a33e76a 100644 --- a/sfx2/source/doc/Metadatable.cxx +++ b/sfx2/source/doc/Metadatable.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -30,7 +31,7 @@ #include <sfx2/Metadatable.hxx> #include <sfx2/XmlIdRegistry.hxx> -#include <vos/mutex.hxx> +#include <osl/mutex.hxx> #include <vcl/svapp.hxx> // solarmutex #include <rtl/random.h> @@ -521,8 +522,8 @@ XmlIdRegistryDocument::XmlIdRegistry_Impl::LookupElement( { if (!isValidXmlId(i_rStreamName, i_rIdref)) { - throw lang::IllegalArgumentException(::rtl::OUString::createFromAscii( - "illegal XmlId"), 0, 0); + throw lang::IllegalArgumentException(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "illegal XmlId")), 0, 0); } const XmlIdList_t * pList( LookupElementList(i_rStreamName, i_rIdref) ); @@ -690,15 +691,15 @@ XmlIdRegistryDocument::TryRegisterMetadatable(Metadatable & i_rObject, if (!isValidXmlId(i_rStreamName, i_rIdref)) { - throw lang::IllegalArgumentException(::rtl::OUString::createFromAscii( - "illegal XmlId"), 0, 0); + throw lang::IllegalArgumentException(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "illegal XmlId")), 0, 0); } if (i_rObject.IsInContent() ? !isContentFile(i_rStreamName) : !isStylesFile(i_rStreamName)) { - throw lang::IllegalArgumentException(::rtl::OUString::createFromAscii( - "illegal XmlId: wrong stream"), 0, 0); + throw lang::IllegalArgumentException(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "illegal XmlId: wrong stream")), 0, 0); } ::rtl::OUString old_path; @@ -993,8 +994,8 @@ XmlIdRegistryClipboard::XmlIdRegistry_Impl::LookupEntry( { if (!isValidXmlId(i_rStreamName, i_rIdref)) { - throw lang::IllegalArgumentException(::rtl::OUString::createFromAscii( - "illegal XmlId"), 0, 0); + throw lang::IllegalArgumentException(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "illegal XmlId")), 0, 0); } const ClipboardXmlIdMap_t::const_iterator iter( m_XmlIdMap.find(i_rIdref) ); @@ -1124,15 +1125,15 @@ XmlIdRegistryClipboard::TryRegisterMetadatable(Metadatable & i_rObject, if (!isValidXmlId(i_rStreamName, i_rIdref)) { - throw lang::IllegalArgumentException(::rtl::OUString::createFromAscii( - "illegal XmlId"), 0, 0); + throw lang::IllegalArgumentException(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "illegal XmlId")), 0, 0); } if (i_rObject.IsInContent() ? !isContentFile(i_rStreamName) : !isStylesFile(i_rStreamName)) { - throw lang::IllegalArgumentException(::rtl::OUString::createFromAscii( - "illegal XmlId: wrong stream"), 0, 0); + throw lang::IllegalArgumentException(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "illegal XmlId: wrong stream")), 0, 0); } ::rtl::OUString old_path; @@ -1261,8 +1262,8 @@ XmlIdRegistryClipboard::RegisterCopyClipboard(Metadatable & i_rCopy, if (!isValidXmlId(i_rReference.First, i_rReference.Second)) { - throw lang::IllegalArgumentException(::rtl::OUString::createFromAscii( - "illegal XmlId"), 0, 0); + throw lang::IllegalArgumentException(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "illegal XmlId")), 0, 0); } if (!i_isLatent) @@ -1354,8 +1355,8 @@ Metadatable::SetMetadataReference( else { throw lang::IllegalArgumentException( - ::rtl::OUString::createFromAscii("Metadatable::" - "SetMetadataReference: argument is invalid"), /*this*/0, 0); + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Metadatable::" + "SetMetadataReference: argument is invalid")), /*this*/0, 0); } } } @@ -1471,19 +1472,6 @@ Metadatable::RegisterAsCopyOf(Metadatable const & i_rSource, { OSL_ENSURE(false, "neither RegDoc nor RegClp cannot happen"); } -#if 0 - { - //FIXME: do we need this at all??? - XmlIdRegistryDocument & rRegDoc( - dynamic_cast<XmlIdRegistryDocument&>( rReg ) ); - { - if (rRegDoc.TryRegisterMetadatable(*this, SourceRef)) - { - this->m_pReg = &rRegDoc; - } - } - } -#endif } } catch (uno::Exception &) @@ -1600,7 +1588,7 @@ Metadatable::JoinMetadatable(Metadatable const & i_rOther, ::rtl::OUString SAL_CALL MetadatableMixin::getLocalName() throw (::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; beans::StringPair mdref( getMetadataReference() ); if (!mdref.Second.getLength()) { @@ -1617,7 +1605,7 @@ Metadatable::JoinMetadatable(Metadatable const & i_rOther, ::rtl::OUString SAL_CALL MetadatableMixin::getNamespace() throw (::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; const uno::Reference< frame::XModel > xModel( GetModel() ); const uno::Reference< rdf::XURI > xDMA( xModel, uno::UNO_QUERY_THROW ); return xDMA->getStringValue(); @@ -1701,3 +1689,4 @@ static void dump(sfx2::XmlIdList_t * pList) #endif +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |