ucb/source/core/ucbstore.hxx | 3 ++- ucb/source/ucp/file/prov.cxx | 2 +- ucb/source/ucp/file/prov.hxx | 4 +++- xmloff/inc/XMLEmbeddedObjectImportContext.hxx | 2 +- xmloff/source/core/XMLEmbeddedObjectImportContext.cxx | 3 +-- xmloff/source/transform/FormPropOOoTContext.cxx | 6 ++---- xmloff/source/transform/FormPropOOoTContext.hxx | 2 +- xmloff/source/transform/MergeElemTContext.cxx | 3 +-- xmloff/source/transform/MergeElemTContext.hxx | 3 ++- xmloff/source/transform/StyleOASISTContext.cxx | 17 ++++------------- 10 files changed, 18 insertions(+), 27 deletions(-)
New commits: commit 925b8da69413708249c6d3f08c86ce54faf4b2e3 Author: Noel Grandin <noel.gran...@collabora.co.uk> AuthorDate: Thu Sep 12 16:38:24 2024 +0200 Commit: Noel Grandin <noel.gran...@collabora.co.uk> CommitDate: Thu Sep 12 19:28:06 2024 +0200 use more concrete UNO types in ucb Change-Id: I3f3c94c6aa320d9e2a7658f0ee7005ae25100fc6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173269 Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> Tested-by: Jenkins diff --git a/ucb/source/core/ucbstore.hxx b/ucb/source/core/ucbstore.hxx index 63d240b5b983..791abdf33dec 100644 --- a/ucb/source/core/ucbstore.hxx +++ b/ucb/source/core/ucbstore.hxx @@ -38,6 +38,7 @@ #include <rtl/ref.hxx> #include <unordered_map> +class PropertySetRegistry; using UcbStore_Base = comphelper::WeakComponentImplHelper < css::lang::XServiceInfo, @@ -48,7 +49,7 @@ class UcbStore : public UcbStore_Base { css::uno::Reference< css::uno::XComponentContext > m_xContext; css::uno::Sequence< css::uno::Any > m_aInitArgs; - css::uno::Reference< css::ucb::XPropertySetRegistry > m_xTheRegistry; + rtl::Reference< PropertySetRegistry > m_xTheRegistry; public: explicit UcbStore( const css::uno::Reference< css::uno::XComponentContext >& xContext ); diff --git a/ucb/source/ucp/file/prov.cxx b/ucb/source/ucp/file/prov.cxx index 4039c955897c..77e7772db7e2 100644 --- a/ucb/source/ucp/file/prov.cxx +++ b/ucb/source/ucp/file/prov.cxx @@ -193,7 +193,7 @@ FileProvider::createContentIdentifier( //XPropertySetInfoImpl -namespace { +namespace fileaccess { class XPropertySetInfoImpl2 : public cppu::OWeakObject, diff --git a/ucb/source/ucp/file/prov.hxx b/ucb/source/ucp/file/prov.hxx index 530010be1f4d..311c1be0e469 100644 --- a/ucb/source/ucp/file/prov.hxx +++ b/ucb/source/ucp/file/prov.hxx @@ -27,6 +27,7 @@ #include <com/sun/star/beans/XPropertySet.hpp> #include <com/sun/star/ucb/XFileIdentifierConverter.hpp> #include <cppuhelper/implbase.hxx> +#include <rtl/ref.hxx> #include <memory> #include <mutex> @@ -39,6 +40,7 @@ namespace fileaccess { class BaseContent; class TaskManager; + class XPropertySetInfoImpl2; class FileProvider: public cppu::WeakImplHelper < css::lang::XServiceInfo, @@ -147,7 +149,7 @@ namespace fileaccess { OUString m_HomeDirectory; sal_Int32 m_FileSystemNotation; - css::uno::Reference< css::beans::XPropertySetInfo > m_xPropertySetInfo; + rtl::Reference< XPropertySetInfoImpl2 > m_xPropertySetInfo; std::unique_ptr<TaskManager> m_pMyShell; }; commit 4000d57869fda437f0361dc4ac991858905a40e9 Author: Noel Grandin <noel.gran...@collabora.co.uk> AuthorDate: Thu Sep 12 16:38:37 2024 +0200 Commit: Noel Grandin <noel.gran...@collabora.co.uk> CommitDate: Thu Sep 12 19:27:53 2024 +0200 use more concrete UNO types in xmloff Change-Id: Idf2bcf23497ef5d673ab36f776f562e8c964b3a3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173270 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> diff --git a/xmloff/inc/XMLEmbeddedObjectImportContext.hxx b/xmloff/inc/XMLEmbeddedObjectImportContext.hxx index ca1ea2ac4dcb..557f61e5b664 100644 --- a/xmloff/inc/XMLEmbeddedObjectImportContext.hxx +++ b/xmloff/inc/XMLEmbeddedObjectImportContext.hxx @@ -26,7 +26,7 @@ namespace com::sun::star::lang { class XComponent; } class XMLEmbeddedObjectImportContext final : public SvXMLImportContext { - css::uno::Reference<css::xml::sax::XFastDocumentHandler > mxFastHandler; + rtl::Reference<SvXMLImport> mxFastHandler; css::uno::Reference<css::lang::XComponent > xComp; OUString sFilterService; diff --git a/xmloff/source/core/XMLEmbeddedObjectImportContext.cxx b/xmloff/source/core/XMLEmbeddedObjectImportContext.cxx index 25b0522ab28f..126ef93d2428 100644 --- a/xmloff/source/core/XMLEmbeddedObjectImportContext.cxx +++ b/xmloff/source/core/XMLEmbeddedObjectImportContext.cxx @@ -131,8 +131,7 @@ void XMLEmbeddedObjectImportContext::SetComponent( Reference< XComponent > const { } - Reference < XImporter > xImporter( mxFastHandler, UNO_QUERY ); - xImporter->setTargetDocument( rComp ); + mxFastHandler->setTargetDocument( rComp ); xComp = rComp; // keep ref to component only if there is a handler diff --git a/xmloff/source/transform/FormPropOOoTContext.cxx b/xmloff/source/transform/FormPropOOoTContext.cxx index 1f5c6086dbfa..5a2ea3ba983a 100644 --- a/xmloff/source/transform/FormPropOOoTContext.cxx +++ b/xmloff/source/transform/FormPropOOoTContext.cxx @@ -231,15 +231,13 @@ void XMLFormPropOOoTransformerContext::EndElement() OUString aAttrQName( GetTransformer().GetNamespaceMap().GetQNameByKey( XML_NAMESPACE_OFFICE, GetXMLToken(m_eValueToken) ) ); - static_cast< XMLMutableAttributeList * >( m_xAttrList.get() ) - ->AddAttribute( aAttrQName, m_xValueContext->GetTextContent() ); + m_xAttrList->AddAttribute( aAttrQName, m_xValueContext->GetTextContent() ); } } if( m_nValueTypeAttr != -1 && m_eValueTypeToken != XML_TOKEN_END ) { - static_cast< XMLMutableAttributeList * >( m_xAttrList.get() ) - ->SetValueByIndex( m_nValueTypeAttr , + m_xAttrList->SetValueByIndex( m_nValueTypeAttr , GetXMLToken( m_eValueTypeToken ) ); } diff --git a/xmloff/source/transform/FormPropOOoTContext.hxx b/xmloff/source/transform/FormPropOOoTContext.hxx index ca0df6bdc74d..64a35c06c3fe 100644 --- a/xmloff/source/transform/FormPropOOoTContext.hxx +++ b/xmloff/source/transform/FormPropOOoTContext.hxx @@ -26,7 +26,7 @@ class XMLFormPropValueTContext_Impl; class XMLFormPropOOoTransformerContext : public XMLTransformerContext { - css::uno::Reference< css::xml::sax::XAttributeList > m_xAttrList; + rtl::Reference< XMLMutableAttributeList > m_xAttrList; ::rtl::Reference< XMLFormPropValueTContext_Impl > m_xValueContext; diff --git a/xmloff/source/transform/MergeElemTContext.cxx b/xmloff/source/transform/MergeElemTContext.cxx index e853240f9e24..8f32ac922531 100644 --- a/xmloff/source/transform/MergeElemTContext.cxx +++ b/xmloff/source/transform/MergeElemTContext.cxx @@ -103,8 +103,7 @@ void XMLMergeElemTransformerContext::ExportStartElement() for( const auto& rChildContext : m_aChildContexts ) { XMLPersTextContentTContext *pContext = rChildContext.get(); - static_cast< XMLMutableAttributeList * >( m_xAttrList.get() ) - ->AddAttribute( pContext->GetExportQName(), + m_xAttrList->AddAttribute( pContext->GetExportQName(), pContext->GetTextContent() ); } XMLTransformerContext::StartElement( m_xAttrList ); diff --git a/xmloff/source/transform/MergeElemTContext.hxx b/xmloff/source/transform/MergeElemTContext.hxx index 9e6cc6f97bcb..486838112061 100644 --- a/xmloff/source/transform/MergeElemTContext.hxx +++ b/xmloff/source/transform/MergeElemTContext.hxx @@ -21,6 +21,7 @@ #include <rtl/ref.hxx> #include "FlatTContext.hxx" +#include "MutableAttrList.hxx" #include <vector> typedef ::std::vector< ::rtl::Reference< XMLPersTextContentTContext> > @@ -28,7 +29,7 @@ typedef ::std::vector< ::rtl::Reference< XMLPersTextContentTContext> > class XMLMergeElemTransformerContext : public XMLTransformerContext { - css::uno::Reference< css::xml::sax::XAttributeList > m_xAttrList; + rtl::Reference< XMLMutableAttributeList > m_xAttrList; XMLPersTextContentTContextVector m_aChildContexts; sal_uInt16 const m_nActionMap; bool m_bStartElementExported; diff --git a/xmloff/source/transform/StyleOASISTContext.cxx b/xmloff/source/transform/StyleOASISTContext.cxx index fadc188bf8bc..75e99d205d39 100644 --- a/xmloff/source/transform/StyleOASISTContext.cxx +++ b/xmloff/source/transform/StyleOASISTContext.cxx @@ -58,7 +58,7 @@ const sal_uInt16 aAttrActionMaps[XML_PROP_TYPE_END] = class XMLPropertiesTContext_Impl : public XMLPersElemContentTContext { - css::uno::Reference< css::xml::sax::XAttributeList > m_xAttrList; + rtl::Reference< XMLMutableAttributeList > m_xAttrList; XMLPropType m_ePropType; bool const m_bControlStyle; @@ -113,17 +113,9 @@ void XMLPropertiesTContext_Impl::StartElement( if( pActions ) { - rtl::Reference<XMLMutableAttributeList> pAttrList; if( !m_xAttrList.is() ) - { - pAttrList = new XMLMutableAttributeList(); - m_xAttrList = pAttrList; - } - else - { - pAttrList = - static_cast< XMLMutableAttributeList * >( m_xAttrList.get() ); - } + m_xAttrList = new XMLMutableAttributeList(); + rtl::Reference<XMLMutableAttributeList> pAttrList = m_xAttrList; XMLTokenEnum eUnderline = XML_TOKEN_END; bool bBoldUnderline = false, bDoubleUnderline = false; @@ -583,8 +575,7 @@ void XMLPropertiesTContext_Impl::StartElement( } else { - static_cast< XMLMutableAttributeList * >( m_xAttrList.get() ) - ->AppendAttributeList( rAttrList ); + m_xAttrList->AppendAttributeList( rAttrList ); } } }