teach refcounting clang plugin about uno::Reference

uno::Reference is only allowed to used with classes that have a
::static_type member.
So convert all those places to rtl::Reference.

Maybe we need some LIBO_INTERNAL_ONLY constructors on rtl::Reference and
uno::Reference to make this a little smoother?

Change-Id: Icdcb35d71ca40a87b1dc474096776412adbfc7e3
Reviewed-on: https://gerrit.libreoffice.org/25516
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
This commit is contained in:
Noel Grandin 2016-05-26 16:02:39 +02:00 committed by Noel Grandin
parent 88c03cd07a
commit 0b23eec200
77 changed files with 327 additions and 242 deletions

View File

@ -29,6 +29,7 @@
#include <com/sun/star/lang/XServiceInfo.hpp>
#include <com/sun/star/lang/XConnectionPointContainer.hpp>
#include <cppuhelper/propshlp.hxx>
#include <rtl/ref.hxx>
#include "basecontrol.hxx"
#include "OConnectionPointContainerHelper.hxx"
@ -213,7 +214,7 @@ private:
css::uno::Reference< css::frame::XFrame2 > m_xFrame;
OUString m_sComponentURL;
css::uno::Sequence< css::beans::PropertyValue > m_seqLoaderArguments;
css::uno::Reference<OConnectionPointContainerHelper> m_aConnectionPointContainer;
rtl::Reference<OConnectionPointContainerHelper> m_aConnectionPointContainer;
}; // class FrameControl

View File

@ -52,6 +52,7 @@
#include <cppuhelper/component.hxx>
#include <cppuhelper/typeprovider.hxx>
#include <cppuhelper/basemutex.hxx>
#include <rtl/ref.hxx>
#include <sot/storage.hxx>
#include <comphelper/listenernotification.hxx>
#include <xmlscript/xmllib_imexp.hxx>
@ -227,7 +228,7 @@ protected:
::osl::Mutex maMutex;
ModifiableHelper maModifiable;
css::uno::Reference<NameContainer> maNameContainer;
rtl::Reference<NameContainer> maNameContainer;
bool mbOldInfoFormat;
bool mbOasis2OOoFormat;
@ -557,7 +558,7 @@ class SfxLibrary
css::uno::Reference< css::ucb::XSimpleFileAccess3 > mxSFI;
ModifiableHelper& mrModifiable;
css::uno::Reference<NameContainer> maNameContainer;
rtl::Reference<NameContainer> maNameContainer;
bool mbLoaded;
bool mbIsModified;

View File

@ -131,7 +131,7 @@ struct Instance {
instance(new comphelper::OSimpleLogRing())
{}
css::uno::Reference<cppu::OWeakObject> instance;
rtl::Reference<cppu::OWeakObject> instance;
};
struct Singleton:

View File

@ -12,6 +12,7 @@
#include "plugin.hxx"
#include "compat.hxx"
#include "typecheck.hxx"
#include "clang/AST/CXXInheritance.h"
/**
@ -50,6 +51,7 @@ public:
bool VisitFieldDecl(const FieldDecl *);
bool VisitVarDecl(const VarDecl *);
bool VisitFunctionDecl(const FunctionDecl *);
bool WalkUpFromObjCIvarDecl(ObjCIvarDecl * decl) {
// Don't recurse into WalkUpFromFieldDecl, as VisitFieldDecl calls
@ -58,6 +60,9 @@ public:
// ObjCIvarDecl.
return VisitObjCIvarDecl(decl);
}
private:
void checkUnoReference(QualType qt, const Decl* decl,
const std::string& rParentName, const std::string& rDeclName);
};
bool BaseCheckNotSubclass(const CXXRecordDecl *BaseDefinition, void *p) {
@ -287,6 +292,39 @@ bool containsSalhelperReferenceObjectSubclass(const Type* pType0) {
}
}
static bool containsStaticTypeMethod(const CXXRecordDecl* x)
{
for (auto it = x->method_begin(); it != x->method_end(); ++it) {
auto i = *it;
if ( !i->isStatic() )
continue;
auto ident = i->getIdentifier();
if ( ident && ident->isStr("static_type") ) {
return true;
}
}
return false;
}
void RefCounting::checkUnoReference(QualType qt, const Decl* decl, const std::string& rParentName, const std::string& rDeclName)
{
if (loplugin::TypeCheck(qt).Class("Reference").Namespace("uno").Namespace("star").Namespace("sun").Namespace("com").GlobalNamespace()) {
const CXXRecordDecl* pRecordDecl = qt->getAsCXXRecordDecl();
const ClassTemplateSpecializationDecl* pTemplate = dyn_cast<ClassTemplateSpecializationDecl>(pRecordDecl);
const TemplateArgument& rArg = pTemplate->getTemplateArgs()[0];
const CXXRecordDecl* templateParam = rArg.getAsType()->getAsCXXRecordDecl()->getDefinition();
if (templateParam && !containsStaticTypeMethod(templateParam)) {
report(
DiagnosticsEngine::Warning,
"uno::Reference " + rDeclName + " with template parameter that does not contain ::static_type() "
+ qt.getAsString()
+ ", parent is " + rParentName,
decl->getLocation())
<< decl->getSourceRange();
}
}
}
bool RefCounting::VisitFieldDecl(const FieldDecl * fieldDecl) {
if (ignoreLocation(fieldDecl)) {
return true;
@ -334,6 +372,9 @@ bool RefCounting::VisitFieldDecl(const FieldDecl * fieldDecl) {
fieldDecl->getLocation())
<< fieldDecl->getSourceRange();
}
checkUnoReference(fieldDecl->getType(), fieldDecl, aParentName, "field");
return true;
}
@ -342,37 +383,51 @@ bool RefCounting::VisitVarDecl(const VarDecl * varDecl) {
if (ignoreLocation(varDecl)) {
return true;
}
if (isa<ParmVarDecl>(varDecl)) {
if (!isa<ParmVarDecl>(varDecl)) {
if (containsSvRefBaseSubclass(varDecl->getType().getTypePtr())) {
report(
DiagnosticsEngine::Warning,
"SvRefBase subclass being directly stack managed, should be managed via tools::SvRef, "
+ varDecl->getType().getAsString(),
varDecl->getLocation())
<< varDecl->getSourceRange();
}
if (containsSalhelperReferenceObjectSubclass(varDecl->getType().getTypePtr())) {
StringRef name { compiler.getSourceManager().getFilename(compiler.getSourceManager().getSpellingLoc(varDecl->getLocation())) };
// this is playing games that it believes is safe
if (name == SRCDIR "/stoc/source/security/permissions.cxx")
return true;
report(
DiagnosticsEngine::Warning,
"salhelper::SimpleReferenceObject subclass being directly stack managed, should be managed via rtl::Reference, "
+ varDecl->getType().getAsString(),
varDecl->getLocation())
<< varDecl->getSourceRange();
}
if (containsXInterfaceSubclass(varDecl->getType())) {
report(
DiagnosticsEngine::Warning,
"XInterface subclass being directly stack managed, should be managed via uno::Reference, "
+ varDecl->getType().getAsString(),
varDecl->getLocation())
<< varDecl->getSourceRange();
}
}
checkUnoReference(varDecl->getType(), varDecl, "", "var");
return true;
}
bool RefCounting::VisitFunctionDecl(const FunctionDecl * functionDecl) {
if (ignoreLocation(functionDecl)) {
return true;
}
if (containsSvRefBaseSubclass(varDecl->getType().getTypePtr())) {
report(
DiagnosticsEngine::Warning,
"SvRefBase subclass being directly stack managed, should be managed via tools::SvRef, "
+ varDecl->getType().getAsString(),
varDecl->getLocation())
<< varDecl->getSourceRange();
}
if (containsSalhelperReferenceObjectSubclass(varDecl->getType().getTypePtr())) {
StringRef name { compiler.getSourceManager().getFilename(compiler.getSourceManager().getSpellingLoc(varDecl->getLocation())) };
// this is playing games that it believes is safe
if (name == SRCDIR "/stoc/source/security/permissions.cxx")
// only consider base declarations, not overriden ones, or we warn on methods that
// are overriding stuff from external libraries
const CXXMethodDecl * methodDecl = dyn_cast<CXXMethodDecl>(functionDecl);
if (methodDecl && methodDecl->size_overridden_methods() > 0) {
return true;
report(
DiagnosticsEngine::Warning,
"salhelper::SimpleReferenceObject subclass being directly stack managed, should be managed via rtl::Reference, "
+ varDecl->getType().getAsString(),
varDecl->getLocation())
<< varDecl->getSourceRange();
}
if (containsXInterfaceSubclass(varDecl->getType())) {
report(
DiagnosticsEngine::Warning,
"XInterface subclass being directly stack managed, should be managed via uno::Reference, "
+ varDecl->getType().getAsString(),
varDecl->getLocation())
<< varDecl->getSourceRange();
}
checkUnoReference(functionDecl->getReturnType(), functionDecl, "", "return");
return true;
}

View File

@ -90,8 +90,12 @@ private:
struct Base1: public css::uno::XInterface {
virtual ~Base1() = delete;
static ::css::uno::Type const & SAL_CALL static_type(void * = nullptr) // loplugin:refcounting
{ return ::cppu::UnoType<Base1>::get(); }
};
struct Base2: public Base1 {
virtual ~Base2() = delete;
};
struct Base2: public Base1 { virtual ~Base2() = delete; };
struct Base3: public Base1 { virtual ~Base3() = delete; };
struct Derived: public Base2, public Base3 {
virtual ~Derived() = delete;
@ -100,7 +104,10 @@ struct Derived: public Base2, public Base3 {
// The special case using the conversion operator instead:
css::uno::Reference< css::uno::XInterface > testUpcast1(
css::uno::Reference< Derived > const & ref)
{ return ref; }
{
Base1::static_type(); // prevent loplugin:unreffun firing
return ref;
}
// The normal up-cast case:
css::uno::Reference< Base1 > testUpcast2(

View File

@ -265,7 +265,7 @@ class TPGalleryThemeProperties : public SfxTabPage
bool bTakeAll;
bool bSearchRecursive;
css::uno::Reference< ::svt::DialogClosedListener > xDialogListener;
rtl::Reference< ::svt::DialogClosedListener > xDialogListener;
css::uno::Reference< css::media::XPlayer > xMediaPlayer;
css::uno::Reference< css::ui::dialogs::XFolderPicker2 > xFolderPicker;

View File

@ -48,7 +48,7 @@ private:
VclPtr<svx::OptHeaderTabListBox> pPathBox;
std::unique_ptr<OptPath_Impl> pImpl;
css::uno::Reference< ::svt::DialogClosedListener > xDialogListener;
rtl::Reference< ::svt::DialogClosedListener > xDialogListener;
css::uno::Reference< css::ui::dialogs::XFolderPicker2 > xFolderPicker;
void ChangeCurrentEntry( const OUString& _rFolder );

View File

@ -81,7 +81,7 @@ private:
::std::vector< JavaInfo* >
m_aAddedInfos;
css::uno::Reference< ::svt::DialogClosedListener > xDialogListener;
rtl::Reference< ::svt::DialogClosedListener > xDialogListener;
css::uno::Reference< css::ui::dialogs::XFolderPicker2 > xFolderPicker;
DECL_LINK_TYPED( EnableHdl_Impl, Button*, void);

View File

@ -86,7 +86,7 @@ class OComponentDefinition :public OContentHelper
,public ::comphelper::OPropertyArrayUsageHelper< OComponentDefinition >
{
protected:
css::uno::Reference< OColumns > m_xColumns;
rtl::Reference< OColumns > m_xColumns;
rtl::Reference<OColumnPropertyListener> m_xColumnPropertyListener;
bool m_bTable;

View File

@ -34,6 +34,7 @@
#include <comphelper/uno3.hxx>
#include <cppuhelper/implbase.hxx>
#include <cppuhelper/supportsservice.hxx>
#include <rtl/ref.hxx>
namespace
{
@ -247,7 +248,7 @@ struct Instance {
instance(new DataAccessDescriptorFactory())
{}
css::uno::Reference<cppu::OWeakObject> instance;
rtl::Reference<cppu::OWeakObject> instance;
};
struct Singleton:

View File

@ -82,7 +82,7 @@ class ODatabaseSource :public ModelDependentComponent // must be first
private:
using ODatabaseSource_Base::rBHelper;
css::uno::Reference<OBookmarkContainer> m_xBookmarks;
rtl::Reference<OBookmarkContainer> m_xBookmarks;
::comphelper::OInterfaceContainerHelper2 m_aFlushListeners;
private:

View File

@ -1045,7 +1045,7 @@ namespace dbmm
m_rProgress.startObject( sObjectName, OUString(), DEFAULT_DOC_PROGRESS_RANGE );
// load the document
Reference< ProgressCapture > pStatusIndicator( new ProgressCapture( sObjectName, m_rProgress ) );
rtl::Reference< ProgressCapture > pStatusIndicator( new ProgressCapture( sObjectName, m_rProgress ) );
SubDocument aSubDocument( _rDocument );
OpenDocResult eResult = lcl_loadSubDocument_nothrow( aSubDocument, pStatusIndicator.get(), m_rLogger );
if ( eResult != eOpenedDoc )

View File

@ -953,8 +953,8 @@ namespace
Reference< XInteractionHandler > xHandler( aArgs.getOrDefault( "InteractionHandler", Reference< XInteractionHandler >() ) );
if ( xHandler.is() )
{
Reference< ::comphelper::OInteractionRequest > pRequest( new ::comphelper::OInteractionRequest( _rException ) );
Reference< ::comphelper::OInteractionApprove > pApprove( new ::comphelper::OInteractionApprove );
rtl::Reference< ::comphelper::OInteractionRequest > pRequest( new ::comphelper::OInteractionRequest( _rException ) );
rtl::Reference< ::comphelper::OInteractionApprove > pApprove( new ::comphelper::OInteractionApprove );
pRequest->addContinuation( pApprove.get() );
try

View File

@ -42,7 +42,7 @@ namespace dbaui
// OSingleDocumentController_Data
struct OSingleDocumentController_Data
{
Reference< UndoManager > m_xUndoManager;
rtl::Reference< UndoManager > m_xUndoManager;
OSingleDocumentController_Data( ::cppu::OWeakObject& i_parent, ::osl::Mutex& i_mutex )
:m_xUndoManager( new UndoManager( i_parent, i_mutex ) )

View File

@ -256,7 +256,7 @@ void ExtensionBox_Impl::dispose()
for ( ITER iIndex = m_vEntries.begin(); iIndex < m_vEntries.end(); ++iIndex )
{
(*iIndex)->m_pPublisher.disposeAndClear();
(*iIndex)->m_xPackage->removeEventListener( uno::Reference< lang::XEventListener > ( m_xRemoveListener, uno::UNO_QUERY ) );
(*iIndex)->m_xPackage->removeEventListener( m_xRemoveListener.get() );
}
m_vEntries.clear();
@ -912,8 +912,7 @@ void ExtensionBox_Impl::addEventListenerOnce(
if ( ::std::none_of(m_vListenerAdded.begin(), m_vListenerAdded.end(),
FindWeakRef(extension)) )
{
extension->addEventListener( uno::Reference< lang::XEventListener > (
m_xRemoveListener, uno::UNO_QUERY ) );
extension->addEventListener( m_xRemoveListener.get() );
m_vListenerAdded.push_back(extension);
}
}
@ -1026,8 +1025,7 @@ void ExtensionBox_Impl::removeEntry( const uno::Reference< deployment::XPackage
// the entry will be moved into the m_vRemovedEntries list which will be
// cleared on the next paint event
m_vRemovedEntries.push_back( *iIndex );
(*iIndex)->m_xPackage->removeEventListener(
uno::Reference<lang::XEventListener>(m_xRemoveListener, uno::UNO_QUERY));
(*iIndex)->m_xPackage->removeEventListener(m_xRemoveListener.get());
m_vEntries.erase( iIndex );
m_bNeedsRecalc = true;

View File

@ -130,7 +130,7 @@ class ExtensionBox_Impl : public ::svt::IExtensionListBox
VclPtr<ScrollBar> m_pScrollBar;
css::uno::Reference<ExtensionRemovedListener> m_xRemoveListener;
rtl::Reference<ExtensionRemovedListener> m_xRemoveListener;
TheExtensionManager *m_pManager;
//This mutex is used for synchronizing access to m_vEntries.

View File

@ -1160,8 +1160,8 @@ namespace drawinglayer
// per polygon. If there are more, split the polygon in half and call recursively
basegfx::B2DPolygon aLeft, aRight;
splitLinePolygon(rBasePolygon, aLeft, aRight);
uno::Reference< primitive2d::PolygonHairlinePrimitive2D > xPLeft(new primitive2d::PolygonHairlinePrimitive2D(aLeft, rHairlinePrimitive.getBColor()));
uno::Reference< primitive2d::PolygonHairlinePrimitive2D > xPRight(new primitive2d::PolygonHairlinePrimitive2D(aRight, rHairlinePrimitive.getBColor()));
rtl::Reference< primitive2d::PolygonHairlinePrimitive2D > xPLeft(new primitive2d::PolygonHairlinePrimitive2D(aLeft, rHairlinePrimitive.getBColor()));
rtl::Reference< primitive2d::PolygonHairlinePrimitive2D > xPRight(new primitive2d::PolygonHairlinePrimitive2D(aRight, rHairlinePrimitive.getBColor()));
processBasePrimitive2D(*xPLeft.get());
processBasePrimitive2D(*xPRight.get());
@ -1208,9 +1208,9 @@ namespace drawinglayer
// per polygon. If there are more, split the polygon in half and call recursively
basegfx::B2DPolygon aLeft, aRight;
splitLinePolygon(rBasePolygon, aLeft, aRight);
uno::Reference< primitive2d::PolygonStrokePrimitive2D > xPLeft(new primitive2d::PolygonStrokePrimitive2D(
rtl::Reference< primitive2d::PolygonStrokePrimitive2D > xPLeft(new primitive2d::PolygonStrokePrimitive2D(
aLeft, rStrokePrimitive.getLineAttribute(), rStrokePrimitive.getStrokeAttribute()));
uno::Reference< primitive2d::PolygonStrokePrimitive2D > xPRight(new primitive2d::PolygonStrokePrimitive2D(
rtl::Reference< primitive2d::PolygonStrokePrimitive2D > xPRight(new primitive2d::PolygonStrokePrimitive2D(
aRight, rStrokePrimitive.getLineAttribute(), rStrokePrimitive.getStrokeAttribute()));
processBasePrimitive2D(*xPLeft.get());
@ -1289,13 +1289,13 @@ namespace drawinglayer
basegfx::B2DPolygon aLeft, aRight;
splitLinePolygon(rBasePolygon, aLeft, aRight);
const attribute::LineStartEndAttribute aEmpty;
uno::Reference< primitive2d::PolygonStrokeArrowPrimitive2D > xPLeft(new primitive2d::PolygonStrokeArrowPrimitive2D(
rtl::Reference< primitive2d::PolygonStrokeArrowPrimitive2D > xPLeft(new primitive2d::PolygonStrokeArrowPrimitive2D(
aLeft,
rStrokeArrowPrimitive.getLineAttribute(),
rStrokeArrowPrimitive.getStrokeAttribute(),
rStrokeArrowPrimitive.getStart(),
aEmpty));
uno::Reference< primitive2d::PolygonStrokeArrowPrimitive2D > xPRight(new primitive2d::PolygonStrokeArrowPrimitive2D(
rtl::Reference< primitive2d::PolygonStrokeArrowPrimitive2D > xPRight(new primitive2d::PolygonStrokeArrowPrimitive2D(
aRight,
rStrokeArrowPrimitive.getLineAttribute(),
rStrokeArrowPrimitive.getStrokeAttribute(),
@ -1367,7 +1367,7 @@ namespace drawinglayer
{
// #i112245# Metafiles use tools Polygon and are not able to have more than 65535 points
// per polygon. If there are more use the splitted polygon and call recursively
uno::Reference< primitive2d::PolyPolygonGraphicPrimitive2D > xSplitted(new primitive2d::PolyPolygonGraphicPrimitive2D(
rtl::Reference< primitive2d::PolyPolygonGraphicPrimitive2D > xSplitted(new primitive2d::PolyPolygonGraphicPrimitive2D(
aLocalPolyPolygon,
rBitmapCandidate.getFillGraphic()));

View File

@ -110,7 +110,7 @@ void Test::testUnoTextFields()
{
{
// DATE
uno::Reference<SvxUnoTextField> xField(new SvxUnoTextField(text::textfield::Type::DATE));
rtl::Reference<SvxUnoTextField> xField(new SvxUnoTextField(text::textfield::Type::DATE));
uno::Sequence<OUString> aSvcs = xField->getSupportedServiceNames();
bool bGood = includes(aSvcs, "com.sun.star.text.textfield.DateTime");
CPPUNIT_ASSERT_MESSAGE("expected service is not present.", bGood);
@ -118,7 +118,7 @@ void Test::testUnoTextFields()
{
// URL
uno::Reference<SvxUnoTextField> xField(new SvxUnoTextField(text::textfield::Type::URL));
rtl::Reference<SvxUnoTextField> xField(new SvxUnoTextField(text::textfield::Type::URL));
uno::Sequence<OUString> aSvcs = xField->getSupportedServiceNames();
bool bGood = includes(aSvcs, "com.sun.star.text.textfield.URL");
CPPUNIT_ASSERT_MESSAGE("expected service is not present.", bGood);
@ -126,7 +126,7 @@ void Test::testUnoTextFields()
{
// PAGE
uno::Reference<SvxUnoTextField> xField(new SvxUnoTextField(text::textfield::Type::PAGE));
rtl::Reference<SvxUnoTextField> xField(new SvxUnoTextField(text::textfield::Type::PAGE));
uno::Sequence<OUString> aSvcs = xField->getSupportedServiceNames();
bool bGood = includes(aSvcs, "com.sun.star.text.textfield.PageNumber");
CPPUNIT_ASSERT_MESSAGE("expected service is not present.", bGood);
@ -134,7 +134,7 @@ void Test::testUnoTextFields()
{
// PAGES
uno::Reference<SvxUnoTextField> xField(new SvxUnoTextField(text::textfield::Type::PAGES));
rtl::Reference<SvxUnoTextField> xField(new SvxUnoTextField(text::textfield::Type::PAGES));
uno::Sequence<OUString> aSvcs = xField->getSupportedServiceNames();
bool bGood = includes(aSvcs, "com.sun.star.text.textfield.PageCount");
CPPUNIT_ASSERT_MESSAGE("expected service is not present.", bGood);
@ -142,7 +142,7 @@ void Test::testUnoTextFields()
{
// TIME
uno::Reference<SvxUnoTextField> xField(new SvxUnoTextField(text::textfield::Type::TIME));
rtl::Reference<SvxUnoTextField> xField(new SvxUnoTextField(text::textfield::Type::TIME));
uno::Sequence<OUString> aSvcs = xField->getSupportedServiceNames();
bool bGood = includes(aSvcs, "com.sun.star.text.textfield.DateTime");
CPPUNIT_ASSERT_MESSAGE("expected service is not present.", bGood);
@ -150,7 +150,7 @@ void Test::testUnoTextFields()
{
// FILE
uno::Reference<SvxUnoTextField> xField(new SvxUnoTextField(text::textfield::Type::DOCINFO_TITLE));
rtl::Reference<SvxUnoTextField> xField(new SvxUnoTextField(text::textfield::Type::DOCINFO_TITLE));
uno::Sequence<OUString> aSvcs = xField->getSupportedServiceNames();
bool bGood = includes(aSvcs, "com.sun.star.text.textfield.docinfo.Title");
CPPUNIT_ASSERT_MESSAGE("expected service is not present.", bGood);
@ -158,7 +158,7 @@ void Test::testUnoTextFields()
{
// TABLE
uno::Reference<SvxUnoTextField> xField(new SvxUnoTextField(text::textfield::Type::TABLE));
rtl::Reference<SvxUnoTextField> xField(new SvxUnoTextField(text::textfield::Type::TABLE));
uno::Sequence<OUString> aSvcs = xField->getSupportedServiceNames();
bool bGood = includes(aSvcs, "com.sun.star.text.textfield.SheetName");
CPPUNIT_ASSERT_MESSAGE("expected service is not present.", bGood);
@ -166,7 +166,7 @@ void Test::testUnoTextFields()
{
// EXTENDED TIME
uno::Reference<SvxUnoTextField> xField(new SvxUnoTextField(text::textfield::Type::EXTENDED_TIME));
rtl::Reference<SvxUnoTextField> xField(new SvxUnoTextField(text::textfield::Type::EXTENDED_TIME));
uno::Sequence<OUString> aSvcs = xField->getSupportedServiceNames();
bool bGood = includes(aSvcs, "com.sun.star.text.textfield.DateTime");
CPPUNIT_ASSERT_MESSAGE("expected service is not present.", bGood);
@ -174,7 +174,7 @@ void Test::testUnoTextFields()
{
// EXTENDED FILE
uno::Reference<SvxUnoTextField> xField(new SvxUnoTextField(text::textfield::Type::EXTENDED_FILE));
rtl::Reference<SvxUnoTextField> xField(new SvxUnoTextField(text::textfield::Type::EXTENDED_FILE));
uno::Sequence<OUString> aSvcs = xField->getSupportedServiceNames();
bool bGood = includes(aSvcs, "com.sun.star.text.textfield.FileName");
CPPUNIT_ASSERT_MESSAGE("expected service is not present.", bGood);
@ -182,7 +182,7 @@ void Test::testUnoTextFields()
{
// AUTHOR
uno::Reference<SvxUnoTextField> xField(new SvxUnoTextField(text::textfield::Type::AUTHOR));
rtl::Reference<SvxUnoTextField> xField(new SvxUnoTextField(text::textfield::Type::AUTHOR));
uno::Sequence<OUString> aSvcs = xField->getSupportedServiceNames();
bool bGood = includes(aSvcs, "com.sun.star.text.textfield.Author");
CPPUNIT_ASSERT_MESSAGE("expected service is not present.", bGood);
@ -190,7 +190,7 @@ void Test::testUnoTextFields()
{
// MEASURE
uno::Reference<SvxUnoTextField> xField(new SvxUnoTextField(text::textfield::Type::MEASURE));
rtl::Reference<SvxUnoTextField> xField(new SvxUnoTextField(text::textfield::Type::MEASURE));
uno::Sequence<OUString> aSvcs = xField->getSupportedServiceNames();
bool bGood = includes(aSvcs, "com.sun.star.text.textfield.Measure");
CPPUNIT_ASSERT_MESSAGE("expected service is not present.", bGood);
@ -198,7 +198,7 @@ void Test::testUnoTextFields()
{
// PRESENTATION HEADER
uno::Reference<SvxUnoTextField> xField(new SvxUnoTextField(text::textfield::Type::PRESENTATION_HEADER));
rtl::Reference<SvxUnoTextField> xField(new SvxUnoTextField(text::textfield::Type::PRESENTATION_HEADER));
uno::Sequence<OUString> aSvcs = xField->getSupportedServiceNames();
bool bGood = includes(aSvcs, "com.sun.star.presentation.textfield.Header");
CPPUNIT_ASSERT_MESSAGE("expected service is not present.", bGood);
@ -206,7 +206,7 @@ void Test::testUnoTextFields()
{
// PRESENTATION FOOTER
uno::Reference<SvxUnoTextField> xField(new SvxUnoTextField(text::textfield::Type::PRESENTATION_FOOTER));
rtl::Reference<SvxUnoTextField> xField(new SvxUnoTextField(text::textfield::Type::PRESENTATION_FOOTER));
uno::Sequence<OUString> aSvcs = xField->getSupportedServiceNames();
bool bGood = includes(aSvcs, "com.sun.star.presentation.textfield.Footer");
CPPUNIT_ASSERT_MESSAGE("expected service is not present.", bGood);
@ -214,7 +214,7 @@ void Test::testUnoTextFields()
{
// PRESENTATION DATE TIME
uno::Reference<SvxUnoTextField> xField(new SvxUnoTextField(text::textfield::Type::PRESENTATION_DATE_TIME));
rtl::Reference<SvxUnoTextField> xField(new SvxUnoTextField(text::textfield::Type::PRESENTATION_DATE_TIME));
uno::Sequence<OUString> aSvcs = xField->getSupportedServiceNames();
bool bGood = includes(aSvcs, "com.sun.star.presentation.textfield.DateTime");
CPPUNIT_ASSERT_MESSAGE("expected service is not present.", bGood);

View File

@ -1596,7 +1596,7 @@ namespace accessibility
// SvxAccessibleTextPropertySet aPropSet( &GetEditSource(),
// ImplGetSvxCharAndParaPropertiesMap() );
// MT IA2 TODO: Check if this is the correct replacement for ImplGetSvxCharAndParaPropertiesMap
uno::Reference< SvxAccessibleTextPropertySet > xPropSet( new SvxAccessibleTextPropertySet( &GetEditSource(), ImplGetSvxTextPortionSvxPropertySet() ) );
rtl::Reference< SvxAccessibleTextPropertySet > xPropSet( new SvxAccessibleTextPropertySet( &GetEditSource(), ImplGetSvxTextPortionSvxPropertySet() ) );
xPropSet->SetSelection( MakeSelection( 0, GetTextLen() ) );
rRes.Value = xPropSet->_getPropertyValue( rRes.Name, mnParagraphIndex );
@ -1619,7 +1619,7 @@ namespace accessibility
else
{
// MT IA2 TODO: Check if this is the correct replacement for ImplGetSvxCharAndParaPropertiesMap
uno::Reference< SvxAccessibleTextPropertySet > xPropSet( new SvxAccessibleTextPropertySet( &GetEditSource(), ImplGetSvxTextPortionSvxPropertySet() ) );
rtl::Reference< SvxAccessibleTextPropertySet > xPropSet( new SvxAccessibleTextPropertySet( &GetEditSource(), ImplGetSvxTextPortionSvxPropertySet() ) );
xPropSet->SetSelection( MakeSelection( 0, GetTextLen() ) );
rRes.Value = xPropSet->_getPropertyValue( rRes.Name, mnParagraphIndex );
rRes.State = xPropSet->_getPropertyState( rRes.Name, mnParagraphIndex );
@ -2399,7 +2399,7 @@ namespace accessibility
// do the indices span the whole paragraph? Then use the outliner map
// TODO: hold it as a member?
uno::Reference< SvxAccessibleTextPropertySet > xPropSet( new SvxAccessibleTextPropertySet( &GetEditSource(),
rtl::Reference< SvxAccessibleTextPropertySet > xPropSet( new SvxAccessibleTextPropertySet( &GetEditSource(),
0 == nStartIndex &&
rCacheTF.GetTextLen(nPara) == nEndIndex ?
ImplGetSvxUnoOutlinerTextCursorSvxPropertySet() :
@ -2464,7 +2464,7 @@ namespace accessibility
// get XPropertySetInfo for paragraph attributes and
// character attributes that span all the paragraphs text.
uno::Reference< SvxAccessibleTextPropertySet > xPropSet( new SvxAccessibleTextPropertySet( &GetEditSource(),
rtl::Reference< SvxAccessibleTextPropertySet > xPropSet( new SvxAccessibleTextPropertySet( &GetEditSource(),
ImplGetSvxCharAndParaPropertiesSet() ) );
xPropSet->SetSelection( MakeSelection( 0, GetTextLen() ) );
uno::Reference< beans::XPropertySetInfo > xPropSetInfo = xPropSet->getPropertySetInfo();
@ -2566,7 +2566,7 @@ namespace accessibility
else
CheckPosition(nIndex);
uno::Reference< SvxAccessibleTextPropertySet > xPropSet( new SvxAccessibleTextPropertySet( &GetEditSource(),
rtl::Reference< SvxAccessibleTextPropertySet > xPropSet( new SvxAccessibleTextPropertySet( &GetEditSource(),
ImplGetSvxCharAndParaPropertiesSet() ) );
xPropSet->SetSelection( MakeSelection( nIndex ) );
uno::Reference< beans::XPropertySetInfo > xPropSetInfo = xPropSet->getPropertySetInfo();

View File

@ -2060,7 +2060,7 @@ void SvxAutoCorrectLanguageLists::SaveExceptList_Imp(
xWriter->setOutputStream(xOut);
uno::Reference < xml::sax::XDocumentHandler > xHandler(xWriter, UNO_QUERY_THROW);
uno::Reference< SvXMLExceptionListExport > xExp( new SvXMLExceptionListExport( xContext, rLst, sStrmName, xHandler ) );
rtl::Reference< SvXMLExceptionListExport > xExp( new SvXMLExceptionListExport( xContext, rLst, sStrmName, xHandler ) );
xExp->exportDoc( XML_BLOCK_LIST );
@ -2427,7 +2427,7 @@ bool SvxAutoCorrectLanguageLists::MakeBlocklist_Imp( SotStorage& rStg )
xWriter->setOutputStream(xOut);
uno::Reference<xml::sax::XDocumentHandler> xHandler(xWriter, uno::UNO_QUERY);
uno::Reference< SvXMLAutoCorrectExport > xExp( new SvXMLAutoCorrectExport( xContext, pAutocorr_List, sStrmName, xHandler ) );
rtl::Reference< SvXMLAutoCorrectExport > xExp( new SvXMLAutoCorrectExport( xContext, pAutocorr_List, sStrmName, xHandler ) );
xExp->exportDoc( XML_BLOCK_LIST );

View File

@ -395,7 +395,7 @@ void SvxWriteXML( EditEngine& rEditEngine, SvStream& rStream, const ESelection&
// SvxXMLTextExportComponent aExporter( &rEditEngine, rSel, aName, xHandler );
uno::Reference< xml::sax::XDocumentHandler > xHandler(xWriter, UNO_QUERY_THROW);
uno::Reference< SvxXMLTextExportComponent > xExporter( new SvxXMLTextExportComponent( xContext, &rEditEngine, rSel, aName, xHandler ) );
rtl::Reference< SvxXMLTextExportComponent > xExporter( new SvxXMLTextExportComponent( xContext, &rEditEngine, rSel, aName, xHandler ) );
xExporter->exportDoc();

View File

@ -897,7 +897,7 @@ void SaneDlg::AcquirePreview()
else
mrSane.SetOptionValue( nOption, true );
Reference<BitmapTransporter> xTransporter(new BitmapTransporter);
rtl::Reference<BitmapTransporter> xTransporter(new BitmapTransporter);
if( ! mrSane.Start( *xTransporter.get() ) )
{
ScopedVclPtrInstance< MessageDialog > aErrorBox(this, SaneResId(STR_ERROR_SCAN));

View File

@ -225,7 +225,7 @@ class UpdateInformationEnumeration : public ::cppu::WeakImplHelper< container::X
{
public:
UpdateInformationEnumeration(const uno::Reference< xml::dom::XNodeList >& xNodeList,
const uno::Reference< UpdateInformationProvider >& xUpdateInformationProvider) :
const rtl::Reference< UpdateInformationProvider >& xUpdateInformationProvider) :
m_xUpdateInformationProvider(xUpdateInformationProvider),
m_xNodeList(xNodeList),
m_nNodes(xNodeList.is() ? xNodeList->getLength() : 0),
@ -280,7 +280,7 @@ public:
}
private:
const uno::Reference< UpdateInformationProvider > m_xUpdateInformationProvider;
const rtl::Reference< UpdateInformationProvider > m_xUpdateInformationProvider;
const uno::Reference< xml::dom::XNodeList > m_xNodeList;
const sal_Int32 m_nNodes;
sal_Int32 m_nCount;

View File

@ -3683,7 +3683,7 @@ void SAL_CALL SVGWriter::write( const Reference<XDocumentHandler>& rxDocHandler,
ReadGDIMetaFile( aMemStm, aMtf );
Reference<SVGExport> pWriter(new SVGExport( mxContext, rxDocHandler, maFilterData ));
rtl::Reference<SVGExport> pWriter(new SVGExport( mxContext, rxDocHandler, maFilterData ));
pWriter->writeMtf( aMtf );
}

View File

@ -23,6 +23,7 @@
#include "nativenumbersupplier.hxx"
#include <unicode/calendar.h>
#include <rtl/ref.hxx>
// class Calendar_gregorian
@ -97,7 +98,7 @@ public:
protected:
const Era *eraArray;
icu::Calendar *body;
css::uno::Reference<NativeNumberSupplierService> mxNatNum;
rtl::Reference<NativeNumberSupplierService> mxNatNum;
const sal_Char* cCalendar;
css::lang::Locale aLocale;
sal_uInt32 fieldSet;

View File

@ -27,6 +27,7 @@
#include <cppuhelper/exc_hlp.hxx>
#include <cppuhelper/supportsservice.hxx>
#include <breakiteratorImpl.hxx>
#include <rtl/ref.hxx>
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::lang;
@ -92,7 +93,7 @@ cclass_Unicode::toTitle( const OUString& Text, sal_Int32 nPos, sal_Int32 nCount,
trans->setMappingType(MappingType::ToTitle, rLocale);
rtl_uString* pStr = rtl_uString_alloc(nCount);
sal_Unicode* out = pStr->buffer;
Reference< BreakIteratorImpl > xBrk(new BreakIteratorImpl(m_xContext));
rtl::Reference< BreakIteratorImpl > xBrk(new BreakIteratorImpl(m_xContext));
Boundary bdy = xBrk->getWordBoundary(Text, nPos, rLocale,
WordType::ANYWORD_IGNOREWHITESPACES, true);
for (sal_Int32 i = nPos; i < nCount + nPos; i++, out++) {

View File

@ -23,6 +23,7 @@
#include <com/sun/star/configuration/theDefaultProvider.hpp>
#include <com/sun/star/text/HoriOrientation.hpp>
#include <osl/diagnose.h>
#include <rtl/ref.hxx>
#include <localedata.hxx>
#include <nativenumbersupplier.hxx>
#include <stdio.h>
@ -858,7 +859,7 @@ DefaultNumberingProvider::makeNumberingString( const Sequence<beans::PropertyVal
}
if (natNum) {
uno::Reference<NativeNumberSupplierService> xNatNum(new NativeNumberSupplierService);
rtl::Reference<NativeNumberSupplierService> xNatNum(new NativeNumberSupplierService);
result += xNatNum->getNativeNumberString(OUString::number( number ), locale, natNum);
} else if (tableSize) {
if ( number > tableSize && !bRecycleSymbol)

View File

@ -18,6 +18,7 @@
*/
#include <rtl/ustrbuf.hxx>
#include <rtl/ref.hxx>
#include <cppuhelper/supportsservice.hxx>
#include <indexentrysupplier.hxx>
#include <localedata.hxx>
@ -116,7 +117,7 @@ IndexEntrySupplier::getLocaleSpecificIndexEntrySupplier(const Locale& rLocale, c
rLocale.Country == aLocale.Country && rLocale.Variant == aLocale.Variant)
return xIES;
else {
uno::Reference<LocaleDataImpl> ld(new LocaleDataImpl);
rtl::Reference<LocaleDataImpl> ld(new LocaleDataImpl);
aLocale = rLocale;
if (rSortAlgorithm.isEmpty())
aSortAlgorithm = ld->getDefaultIndexAlgorithm( rLocale );

View File

@ -18,6 +18,7 @@
*/
#include <com/sun/star/uno/XComponentContext.hpp>
#include <rtl/ref.hxx>
#include <transliteration_Ignore.hxx>
#include <transliteration_OneToOne.hxx>
@ -31,7 +32,7 @@ OUString SAL_CALL
ignoreKana::folding( const OUString& inStr, sal_Int32 startPos, sal_Int32 nCount, Sequence< sal_Int32 >& offset )
throw(RuntimeException, std::exception)
{
Reference< hiraganaToKatakana > t1(new hiraganaToKatakana);
rtl::Reference< hiraganaToKatakana > t1(new hiraganaToKatakana);
return t1->transliterate(inStr, startPos, nCount, offset);
}
@ -39,8 +40,8 @@ Sequence< OUString > SAL_CALL
ignoreKana::transliterateRange( const OUString& str1, const OUString& str2 )
throw(RuntimeException, std::exception)
{
Reference< hiraganaToKatakana > t1(new hiraganaToKatakana);
Reference< katakanaToHiragana > t2(new katakanaToHiragana);
rtl::Reference< hiraganaToKatakana > t1(new hiraganaToKatakana);
rtl::Reference< katakanaToHiragana > t2(new katakanaToHiragana);
return transliteration_Ignore::transliterateRange(str1, str2, *t1.get(), *t2.get());
}
@ -48,7 +49,7 @@ ignoreKana::transliterateRange( const OUString& str1, const OUString& str2 )
sal_Unicode SAL_CALL
ignoreKana::transliterateChar2Char( sal_Unicode inChar) throw(RuntimeException, MultipleCharsOutputException, std::exception)
{
Reference< hiraganaToKatakana > t1(new hiraganaToKatakana);
rtl::Reference< hiraganaToKatakana > t1(new hiraganaToKatakana);
return t1->transliterateChar2Char(inChar);
}

View File

@ -19,6 +19,7 @@
#include <transliteration_Ignore.hxx>
#include <transliteration_OneToOne.hxx>
#include <rtl/ref.hxx>
using namespace com::sun::star::uno;
using namespace com::sun::star::lang;
@ -29,7 +30,7 @@ OUString SAL_CALL
ignoreSize_ja_JP::folding( const OUString& inStr, sal_Int32 startPos, sal_Int32 nCount, Sequence< sal_Int32 >& offset )
throw(RuntimeException, std::exception)
{
Reference< smallToLarge_ja_JP > t1(new smallToLarge_ja_JP);
rtl::Reference< smallToLarge_ja_JP > t1(new smallToLarge_ja_JP);
return t1->transliterate(inStr, startPos, nCount, offset);
}
@ -38,8 +39,8 @@ Sequence< OUString > SAL_CALL
ignoreSize_ja_JP::transliterateRange( const OUString& str1, const OUString& str2 )
throw(RuntimeException, std::exception)
{
Reference< smallToLarge_ja_JP > t1(new smallToLarge_ja_JP);
Reference< largeToSmall_ja_JP > t2(new largeToSmall_ja_JP);
rtl::Reference< smallToLarge_ja_JP > t1(new smallToLarge_ja_JP);
rtl::Reference< largeToSmall_ja_JP > t2(new largeToSmall_ja_JP);
return transliteration_Ignore::transliterateRange(str1, str2, *t1.get(), *t2.get());
}
@ -47,7 +48,7 @@ ignoreSize_ja_JP::transliterateRange( const OUString& str1, const OUString& str2
sal_Unicode SAL_CALL
ignoreSize_ja_JP::transliterateChar2Char( sal_Unicode inChar) throw(RuntimeException, MultipleCharsOutputException, std::exception)
{
Reference< smallToLarge_ja_JP > t1(new smallToLarge_ja_JP);
rtl::Reference< smallToLarge_ja_JP > t1(new smallToLarge_ja_JP);
return t1->transliterateChar2Char(inChar);
}

View File

@ -18,6 +18,7 @@
*/
#include <com/sun/star/uno/XComponentContext.hpp>
#include <rtl/ref.hxx>
#include <transliteration_Ignore.hxx>
#include <transliteration_OneToOne.hxx>
@ -31,7 +32,7 @@ OUString SAL_CALL
ignoreWidth::folding( const OUString& inStr, sal_Int32 startPos, sal_Int32 nCount, Sequence< sal_Int32 >& offset )
throw(RuntimeException, std::exception)
{
Reference< fullwidthToHalfwidth > t1(new fullwidthToHalfwidth);
rtl::Reference< fullwidthToHalfwidth > t1(new fullwidthToHalfwidth);
return t1->transliterate(inStr, startPos, nCount, offset);
}
@ -39,8 +40,8 @@ Sequence< OUString > SAL_CALL
ignoreWidth::transliterateRange( const OUString& str1, const OUString& str2 )
throw(RuntimeException, std::exception)
{
Reference< fullwidthToHalfwidth > t1(new fullwidthToHalfwidth);
Reference< halfwidthToFullwidth > t2(new halfwidthToFullwidth);
rtl::Reference< fullwidthToHalfwidth > t1(new fullwidthToHalfwidth);
rtl::Reference< halfwidthToFullwidth > t2(new halfwidthToFullwidth);
return transliteration_Ignore::transliterateRange(str1, str2, *t1.get(), *t2.get());
}
@ -48,7 +49,7 @@ ignoreWidth::transliterateRange( const OUString& str1, const OUString& str2 )
sal_Unicode SAL_CALL
ignoreWidth::transliterateChar2Char( sal_Unicode inChar) throw(RuntimeException, MultipleCharsOutputException, std::exception)
{
Reference< fullwidthToHalfwidth > t1(new fullwidthToHalfwidth);
rtl::Reference< fullwidthToHalfwidth > t1(new fullwidthToHalfwidth);
return t1->transliterateChar2Char(inChar);
}

View File

@ -18,6 +18,7 @@
*/
#include <rtl/ustrbuf.hxx>
#include <rtl/ref.hxx>
#include <i18nutil/casefolding.hxx>
#include <i18nutil/unicode.hxx>
@ -269,7 +270,7 @@ static OUString transliterate_titlecase_Impl(
if (!aText.isEmpty())
{
Reference< XComponentContext > xContext = ::comphelper::getProcessComponentContext();
Reference< CharacterClassificationImpl > xCharClassImpl( new CharacterClassificationImpl( xContext ) );
rtl::Reference< CharacterClassificationImpl > xCharClassImpl( new CharacterClassificationImpl( xContext ) );
// because xCharClassImpl.toTitle does not handle ligatures or Beta but will raise
// an exception we need to handle the first chara manually...

View File

@ -18,6 +18,7 @@
*/
#include <com/sun/star/uno/XComponentContext.hpp>
#include <rtl/ref.hxx>
#include <i18nutil/oneToOneMapping.hxx>
#include <i18nutil/casefolding.hxx>
@ -59,8 +60,8 @@ Transliteration_caseignore::transliterateRange( const OUString& str1, const OUSt
if (str1.getLength() != 1 || str2.getLength() != 1)
throw RuntimeException();
static Reference< Transliteration_u2l > u2l(new Transliteration_u2l);
static Reference< Transliteration_l2u > l2u(new Transliteration_l2u);
static rtl::Reference< Transliteration_u2l > u2l(new Transliteration_u2l);
static rtl::Reference< Transliteration_l2u > l2u(new Transliteration_l2u);
u2l->loadModule((TransliterationModules)0, aLocale);
l2u->loadModule((TransliterationModules)0, aLocale);

View File

@ -24,6 +24,7 @@
#include <sal/types.h>
#include <com/sun/star/uno/Reference.hxx>
#include <com/sun/star/uno/Sequence.hxx>
#include <rtl/ref.hxx>
#include <rtl/ustring.hxx>
#include <tools/errcode.hxx>
#include <vcl/dialog.hxx>
@ -100,7 +101,7 @@ private:
Link<FileDialogHelper*,void> m_aDialogClosedLink;
ErrCode m_nError;
css::uno::Reference< FileDialogHelper_Impl > mpImpl;
rtl::Reference< FileDialogHelper_Impl > mpImpl;
public:
@ -132,9 +133,11 @@ public:
const css::uno::Sequence< OUString >& rBlackList,
vcl::Window* _pPreferredParent = nullptr );
virtual ~FileDialogHelper();
FileDialogHelper& operator=(const FileDialogHelper &) = delete;
FileDialogHelper(const FileDialogHelper &) = delete;
ErrCode Execute();
void StartExecuteModal( const Link<FileDialogHelper*,void>& rEndDialogHdl );
inline ErrCode GetError() const { return m_nError; }

View File

@ -245,7 +245,7 @@ void XmlFilterBase::importDocumentProperties()
MediaDescriptor aMediaDesc( getMediaDescriptor() );
Reference< XInputStream > xInputStream;
Reference< XComponentContext > xContext = getComponentContext();
Reference< ::oox::core::FilterDetect > xDetector( new ::oox::core::FilterDetect( xContext ) );
rtl::Reference< ::oox::core::FilterDetect > xDetector( new ::oox::core::FilterDetect( xContext ) );
xInputStream = xDetector->extractUnencryptedPackage( aMediaDesc );
Reference< XComponent > xModel( getModel(), UNO_QUERY );
Reference< XStorage > xDocumentStorage (
@ -820,7 +820,7 @@ Reference< XInputStream > XmlFilterBase::implGetInputStream( MediaDescriptor& rM
/* Get the input stream directly from the media descriptor, or decrypt the
package again. The latter is needed e.g. when the document is reloaded.
All this is implemented in the detector service. */
Reference< FilterDetect > xDetector( new FilterDetect( getComponentContext() ) );
rtl::Reference< FilterDetect > xDetector( new FilterDetect( getComponentContext() ) );
return xDetector->extractUnencryptedPackage( rMediaDesc );
}

View File

@ -107,7 +107,7 @@ class OFieldExpressionControl : public ::svt::EditBrowseBox
ImplSVEvent * m_nDeleteEvent;
VclPtr<OGroupsSortingDialog> m_pParent;
bool m_bIgnoreEvent;
css::uno::Reference<OFieldExpressionControlContainerListener> aContainerListener;
rtl::Reference<OFieldExpressionControlContainerListener> aContainerListener;
bool SaveModified(bool _bAppend);

View File

@ -13,6 +13,7 @@
#include <cppunit/extensions/HelperMacros.h>
#include <cppunit/plugin/TestPlugIn.h>
#include <rtl/ref.hxx>
#include <sax/fastattribs.hxx>
using namespace css;
@ -32,7 +33,7 @@ public:
void AttributesTest::test()
{
uno::Reference<sax_fastparser::FastAttributeList> xAttributeList( new sax_fastparser::FastAttributeList(nullptr) );
rtl::Reference<sax_fastparser::FastAttributeList> xAttributeList( new sax_fastparser::FastAttributeList(nullptr) );
xAttributeList->add(1, "1");
xAttributeList->add(2, OString("2"));

View File

@ -45,8 +45,8 @@ public:
class ParserTest: public test::BootstrapFixture
{
InputSource maInput;
uno::Reference< sax_fastparser::FastSaxParser > mxParser;
uno::Reference< DummyTokenHandler > mxTokenHandler;
rtl::Reference< sax_fastparser::FastSaxParser > mxParser;
rtl::Reference< DummyTokenHandler > mxTokenHandler;
public:
virtual void setUp() override;

View File

@ -194,7 +194,7 @@ class XMLImportTest : public test::BootstrapFixture
{
private:
OUString m_sDirPath;
Reference< TestDocumentHandler > m_xDocumentHandler;
rtl::Reference< TestDocumentHandler > m_xDocumentHandler;
Reference< xml::sax::XParser > m_xParser;
Reference< lang::XMultiServiceFactory > m_xSMgr;
@ -217,7 +217,7 @@ void XMLImportTest::setUp()
m_xSMgr = getMultiServiceFactory();
m_xParser = xml::sax::Parser::create(
::comphelper::getProcessComponentContext() );
m_xParser->setDocumentHandler( m_xDocumentHandler );
m_xParser->setDocumentHandler( m_xDocumentHandler.get() );
m_sDirPath = m_directories.getPathFromSrc( "/sax/qa/data/" );
}

View File

@ -5645,7 +5645,7 @@ void SAL_CALL ScCellRangeObj::filter( const uno::Reference<sheet::XSheetFilterDe
//! wenn es schon ein ScFilterDescriptor ist, direkt per getImplementation?
ScDocShell* pDocSh = GetDocShell();
uno::Reference<ScFilterDescriptor> xImpl(new ScFilterDescriptor(pDocSh));
rtl::Reference<ScFilterDescriptor> xImpl(new ScFilterDescriptor(pDocSh));
uno::Reference< sheet::XSheetFilterDescriptor2 > xDescriptor2( xDescriptor, uno::UNO_QUERY );
if ( xDescriptor2.is() )
{

View File

@ -3292,9 +3292,9 @@ uno::Reference< util::XCloneable > SAL_CALL ScChart2DataSequence::createClone()
aTokensNew.push_back(p);
}
uno::Reference<ScChart2DataSequence> p(new ScChart2DataSequence(m_pDocument, m_xDataProvider, std::move(aTokensNew), m_bIncludeHiddenCells));
rtl::Reference<ScChart2DataSequence> p(new ScChart2DataSequence(m_pDocument, m_xDataProvider, std::move(aTokensNew), m_bIncludeHiddenCells));
p->CopyData(*this);
Reference< util::XCloneable > xClone(p);
Reference< util::XCloneable > xClone(p.get());
return xClone;
}

View File

@ -2025,7 +2025,7 @@ void SAL_CALL ScModelObj::consolidate(
// die Daten in ein ScConsolidationDescriptor Objekt zu kopieren:
//! wenn es schon ein ScConsolidationDescriptor ist, direkt per getImplementation?
uno::Reference< ScConsolidationDescriptor > xImpl(new ScConsolidationDescriptor);
rtl::Reference< ScConsolidationDescriptor > xImpl(new ScConsolidationDescriptor);
xImpl->setFunction( xDescriptor->getFunction() );
xImpl->setSources( xDescriptor->getSources() );
xImpl->setStartOutputPosition( xDescriptor->getStartOutputPosition() );

View File

@ -49,7 +49,7 @@ bool ScWarnPassword::WarningOnPassword( SfxMedium& rMedium )
InteractionClassification_QUERY,
ERRCODE_SVX_EXPORT_FILTER_CRYPT)));
Reference< ucbhelper::SimpleInteractionRequest > xRequest
rtl::Reference< ucbhelper::SimpleInteractionRequest > xRequest
= new ucbhelper::SimpleInteractionRequest(
aException,
ucbhelper::CONTINUATION_APPROVE

View File

@ -84,7 +84,7 @@ ScVbaFont::setSuperscript( const uno::Any& aValue ) throw ( uno::RuntimeExceptio
for ( sal_Int32 row = 0; row < nRows; ++row )
{
uno::Reference< beans::XPropertySet > xProps( xCellRange->getCellByPosition( col, row ) , uno::UNO_QUERY_THROW );
uno::Reference< ScVbaFont > aFont( new ScVbaFont( getParent(), mxContext, mPalette, xProps ) );
rtl::Reference< ScVbaFont > aFont( new ScVbaFont( getParent(), mxContext, mPalette, xProps ) );
aFont->setSuperscript( aValue );
}
}
@ -124,7 +124,7 @@ ScVbaFont::getSuperscript() throw ( uno::RuntimeException, std::exception )
for ( sal_Int32 row = 0; row < nRows; ++row )
{
uno::Reference< beans::XPropertySet > xProps( xCellRange->getCellByPosition( col, row ), uno::UNO_QUERY_THROW );
uno::Reference< ScVbaFont > aFont( new ScVbaFont( getParent(), mxContext, mPalette, xProps ) );
rtl::Reference< ScVbaFont > aFont( new ScVbaFont( getParent(), mxContext, mPalette, xProps ) );
if ( !col && !row )
aRes = aFont->getSuperscript();
else if ( aRes != aFont->getSuperscript() )
@ -156,7 +156,7 @@ ScVbaFont::setSubscript( const uno::Any& aValue ) throw ( uno::RuntimeException,
for ( sal_Int32 row = 0; row < nRows; ++row )
{
uno::Reference< beans::XPropertySet > xProps( xCellRange->getCellByPosition( col, row ) , uno::UNO_QUERY_THROW );
uno::Reference< ScVbaFont > aFont( new ScVbaFont( getParent(), mxContext, mPalette, xProps ) );
rtl::Reference< ScVbaFont > aFont( new ScVbaFont( getParent(), mxContext, mPalette, xProps ) );
aFont->setSubscript( aValue );
}
}
@ -198,7 +198,7 @@ ScVbaFont::getSubscript() throw ( uno::RuntimeException, std::exception )
for ( sal_Int32 row = 0; row < nRows; ++row )
{
uno::Reference< beans::XPropertySet > xProps( xCellRange->getCellByPosition( col, row ), uno::UNO_QUERY_THROW );
uno::Reference< ScVbaFont > aFont( new ScVbaFont( getParent(), mxContext, mPalette, xProps ) );
rtl::Reference< ScVbaFont > aFont( new ScVbaFont( getParent(), mxContext, mPalette, xProps ) );
if ( !col && !row )
aRes = aFont->getSubscript();
else if ( aRes != aFont->getSubscript() )

View File

@ -307,7 +307,7 @@ ScVbaWindow::getCaption() throw (uno::RuntimeException, std::exception)
if ( ( nCrudLen + nCrudIndex ) == sTitle.getLength() )
{
sTitle = sTitle.copy( 0, nCrudIndex );
uno::Reference< ScVbaWorkbook > workbook( new ScVbaWorkbook( uno::Reference< XHelperInterface >( Application(), uno::UNO_QUERY_THROW ), mxContext, m_xModel ) );
rtl::Reference< ScVbaWorkbook > workbook( new ScVbaWorkbook( uno::Reference< XHelperInterface >( Application(), uno::UNO_QUERY_THROW ), mxContext, m_xModel ) );
OUString sName = workbook->getName();
// rather bizarre hack to make sure the name behavior
// is like XL
@ -439,7 +439,7 @@ ScVbaWindow::setWindowState( const uno::Any& _windowstate ) throw (uno::RuntimeE
void
ScVbaWindow::Activate() throw (css::uno::RuntimeException, std::exception)
{
uno::Reference<ScVbaWorkbook> workbook( new ScVbaWorkbook( uno::Reference< XHelperInterface >( Application(), uno::UNO_QUERY_THROW ), mxContext, m_xModel ) );
rtl::Reference<ScVbaWorkbook> workbook( new ScVbaWorkbook( uno::Reference< XHelperInterface >( Application(), uno::UNO_QUERY_THROW ), mxContext, m_xModel ) );
workbook->Activate();
}
@ -447,7 +447,7 @@ ScVbaWindow::Activate() throw (css::uno::RuntimeException, std::exception)
void
ScVbaWindow::Close( const uno::Any& SaveChanges, const uno::Any& FileName, const uno::Any& RouteWorkBook ) throw (uno::RuntimeException, std::exception)
{
uno::Reference< ScVbaWorkbook > workbook( new ScVbaWorkbook( uno::Reference< XHelperInterface >( Application(), uno::UNO_QUERY_THROW ), mxContext, m_xModel ) );
rtl::Reference< ScVbaWorkbook > workbook( new ScVbaWorkbook( uno::Reference< XHelperInterface >( Application(), uno::UNO_QUERY_THROW ), mxContext, m_xModel ) );
workbook->Close(SaveChanges, FileName, RouteWorkBook );
}

View File

@ -128,7 +128,7 @@ public:
// !! TODO !! iterate over all controllers
uno::Reference< frame::XController > xController( xModel->getCurrentController(), uno::UNO_SET_THROW );
uno::Reference< XHelperInterface > xTemp; // temporary needed for g++ 3.3.5
uno::Reference< ScVbaWindow > window( new ScVbaWindow( xTemp, m_xContext, xModel, xController ) );
rtl::Reference< ScVbaWindow > window( new ScVbaWindow( xTemp, m_xContext, xModel, xController ) );
OUString sCaption;
window->getCaption() >>= sCaption;
namesToIndices[ sCaption ] = nIndex++;

View File

@ -105,7 +105,7 @@ class ClientBox : public Control
VclPtr<ScrollBar> m_aScrollBar;
css::uno::Reference< ClientRemovedListener > m_xRemoveListener;
rtl::Reference< ClientRemovedListener > m_xRemoveListener;
//This mutex is used for synchronizing access to m_vEntries.
//Currently it is used to synchronize adding, removing entries and

View File

@ -20,9 +20,11 @@
#ifndef INCLUDED_SD_SOURCE_UI_INC_EVENTMULTIPLEXER_HXX
#define INCLUDED_SD_SOURCE_UI_INC_EVENTMULTIPLEXER_HXX
#include <sal/config.h>
#include <rtl/ref.hxx>
#include <svl/lstner.hxx>
#include <tools/link.hxx>
#include <com/sun/star/uno/Reference.hxx>
#include <set>
#include <memory>
@ -203,7 +205,7 @@ public:
private:
class Implementation;
css::uno::Reference<Implementation> mpImpl;
rtl::Reference<Implementation> mpImpl;
};
} } // end of namespace ::sd::tools

View File

@ -575,7 +575,7 @@ void DrawViewShell::SetActiveTabLayerIndex (int nIndex)
// Tell the draw view and the tab control of the new active layer.
mpDrawView->SetActiveLayer (pBar->GetPageText (pBar->GetPageId ((sal_uInt16)nIndex)));
pBar->SetCurPageId (pBar->GetPageId ((sal_uInt16)nIndex));
css::uno::Reference<SdUnoDrawView> pUnoDrawView(new SdUnoDrawView (
rtl::Reference<SdUnoDrawView> pUnoDrawView(new SdUnoDrawView (
*this,
*GetView()));
css::uno::Reference< css::drawing::XLayer> rLayer = pUnoDrawView->getActiveLayer();

View File

@ -27,6 +27,7 @@
#include <sal/main.h>
#include <osl/process.h>
#include <rtl/ref.hxx>
#include <unotest/bootstrapfixturebase.hxx>
#include <comphelper/processfactory.hxx>
#include <cppuhelper/bootstrap.hxx>
@ -74,7 +75,7 @@ SAL_IMPLEMENT_MAIN_WITH_ARGS(argc, argv)
test::BootstrapFixtureBase aEnv;
aEnv.setUp();
uno::Reference<pdfi::PDFIRawAdaptor> xAdaptor( new pdfi::PDFIRawAdaptor(OUString(), aEnv.getComponentContext()) );
rtl::Reference<pdfi::PDFIRawAdaptor> xAdaptor( new pdfi::PDFIRawAdaptor(OUString(), aEnv.getComponentContext()) );
xAdaptor->setTreeVisitorFactory(pTreeFactory);
nRet = xAdaptor->odfConvert(aSrcURL, new OutputWrap(aDstURL), nullptr) ? 0 : 1;
}

View File

@ -468,7 +468,7 @@ namespace
void testOdfDrawExport()
{
uno::Reference<pdfi::PDFIRawAdaptor> xAdaptor( new pdfi::PDFIRawAdaptor(OUString(), getComponentContext()) );
rtl::Reference<pdfi::PDFIRawAdaptor> xAdaptor( new pdfi::PDFIRawAdaptor(OUString(), getComponentContext()) );
xAdaptor->setTreeVisitorFactory( createDrawTreeVisitorFactory() );
OUString tempFileURL;
@ -483,7 +483,7 @@ namespace
void testOdfWriterExport()
{
uno::Reference<pdfi::PDFIRawAdaptor> xAdaptor( new pdfi::PDFIRawAdaptor(OUString(), getComponentContext()) );
rtl::Reference<pdfi::PDFIRawAdaptor> xAdaptor( new pdfi::PDFIRawAdaptor(OUString(), getComponentContext()) );
xAdaptor->setTreeVisitorFactory( createWriterTreeVisitorFactory() );
OUString tempFileURL;
@ -498,7 +498,7 @@ namespace
void testTdf96993()
{
uno::Reference<pdfi::PDFIRawAdaptor> xAdaptor(new pdfi::PDFIRawAdaptor(OUString(), getComponentContext()));
rtl::Reference<pdfi::PDFIRawAdaptor> xAdaptor(new pdfi::PDFIRawAdaptor(OUString(), getComponentContext()));
xAdaptor->setTreeVisitorFactory(createDrawTreeVisitorFactory());
OString aOutput;
@ -512,7 +512,7 @@ namespace
void testTdf98421()
{
uno::Reference<pdfi::PDFIRawAdaptor> xAdaptor(new pdfi::PDFIRawAdaptor(OUString(), getComponentContext()));
rtl::Reference<pdfi::PDFIRawAdaptor> xAdaptor(new pdfi::PDFIRawAdaptor(OUString(), getComponentContext()));
xAdaptor->setTreeVisitorFactory(createWriterTreeVisitorFactory());
OString aOutput;

View File

@ -33,9 +33,9 @@ MultiLineEdit::GetComponentInterface(bool bCreate)
VclMultiLineEdit::GetComponentInterface(false));
if (!xPeer.is() && bCreate)
{
css::uno::Reference< VCLXMultiLineEdit > xVCLMEdit(new VCLXMultiLineEdit);
rtl::Reference< VCLXMultiLineEdit > xVCLMEdit(new VCLXMultiLineEdit);
xVCLMEdit->SetWindow(this);
xPeer = xVCLMEdit;
xPeer = xVCLMEdit.get();
SetComponentInterface(xPeer);
}
return xPeer;

View File

@ -268,7 +268,7 @@ namespace sdr
aScale, fShearX, fRotate, aTranslate));
// directly create temp SdrBlockTextPrimitive2D
css::uno::Reference< drawinglayer::primitive2d::SdrBlockTextPrimitive2D > xBlockTextPrimitive(new drawinglayer::primitive2d::SdrBlockTextPrimitive2D(
rtl::Reference< drawinglayer::primitive2d::SdrBlockTextPrimitive2D > xBlockTextPrimitive(new drawinglayer::primitive2d::SdrBlockTextPrimitive2D(
pSdrText,
*pOPO,
aTextRangeTransform,

View File

@ -25,6 +25,7 @@
#include <basegfx/polygon/b2dpolypolygontools.hxx>
#include <basegfx/tools/canvastools.hxx>
#include <drawinglayer/primitive2d/groupprimitive2d.hxx>
#include <rtl/ref.hxx>
#include <svx/sdr/primitive2d/svx_primitivetypes2d.hxx>
#include <basegfx/matrix/b2dhommatrixtools.hxx>
#include <drawinglayer/primitive2d/hiddengeometryprimitive2d.hxx>
@ -84,7 +85,7 @@ namespace drawinglayer
Primitive2DContainer SdrMeasurePrimitive2D::create2DDecomposition(const geometry::ViewInformation2D& aViewInformation) const
{
Primitive2DContainer aRetval;
css::uno::Reference<SdrBlockTextPrimitive2D> xBlockText;
rtl::Reference<SdrBlockTextPrimitive2D> xBlockText;
basegfx::B2DRange aTextRange;
const basegfx::B2DVector aLine(getEnd() - getStart());
const double fDistance(aLine.getLength());

View File

@ -84,8 +84,8 @@ public:
Reference< XAccessible> mxAccessible;
sal_Int32 mRowCount, mColCount;
//get the cached AccessibleCell from XCell
Reference< AccessibleCell > getAccessibleCell (const Reference< XCell >& xCell);
Reference< AccessibleCell > getAccessibleCell (sal_Int32 nRow, sal_Int32 nColumn) throw (IndexOutOfBoundsException, RuntimeException);
rtl::Reference< AccessibleCell > getAccessibleCell (const Reference< XCell >& xCell);
rtl::Reference< AccessibleCell > getAccessibleCell (sal_Int32 nRow, sal_Int32 nColumn) throw (IndexOutOfBoundsException, RuntimeException);
};
@ -136,23 +136,23 @@ void AccessibleTableShapeImpl::dispose()
//get the cached AccessibleCell from XCell
Reference< AccessibleCell > AccessibleTableShapeImpl::getAccessibleCell (const Reference< XCell >& xCell)
rtl::Reference< AccessibleCell > AccessibleTableShapeImpl::getAccessibleCell (const Reference< XCell >& xCell)
{
AccessibleCellMap::iterator iter( maChildMap.find( xCell ) );
if( iter != maChildMap.end() )
{
Reference< AccessibleCell > xChild( (*iter).second.get() );
rtl::Reference< AccessibleCell > xChild( (*iter).second.get() );
return xChild;
}
return Reference< AccessibleCell >();
return rtl::Reference< AccessibleCell >();
}
Reference< AccessibleCell > AccessibleTableShapeImpl::getAccessibleCell (sal_Int32 nRow, sal_Int32 nColumn)
rtl::Reference< AccessibleCell > AccessibleTableShapeImpl::getAccessibleCell (sal_Int32 nRow, sal_Int32 nColumn)
throw (IndexOutOfBoundsException, RuntimeException)
{
Reference< XCell > xCell( mxTable->getCellByPosition( nColumn, nRow ) );
Reference< AccessibleCell > xChild = getAccessibleCell( xCell );
rtl::Reference< AccessibleCell > xChild = getAccessibleCell( xCell );
if( !xChild.is() && mxTable.is() )
{
@ -164,7 +164,7 @@ Reference< AccessibleCell > AccessibleTableShapeImpl::getAccessibleCell (sal_Int
xAccessibleCell->Init();
maChildMap[xCell] = xAccessibleCell;
xChild = Reference< AccessibleCell >( xAccessibleCell.get() );
xChild = rtl::Reference< AccessibleCell >( xAccessibleCell.get() );
}
return xChild;
}
@ -918,7 +918,7 @@ void SAL_CALL AccessibleTableShape::selectionChanged (const EventObject& rEvent
Reference< XCell > xCell(rEvent.Source, UNO_QUERY);
if (xCell.is())
{
Reference< AccessibleCell > xAccCell = mxImpl->getAccessibleCell( xCell );
rtl::Reference< AccessibleCell > xAccCell = mxImpl->getAccessibleCell( xCell );
if (xAccCell.is())
{
sal_Int32 nIndex = xAccCell->getAccessibleIndexInParent(),
@ -946,7 +946,7 @@ void SAL_CALL AccessibleTableShape::selectionChanged (const EventObject& rEvent
// Get the currently active cell which is text editing
AccessibleCell* AccessibleTableShape::GetActiveAccessibleCell()
{
Reference< AccessibleCell > xAccCell;
rtl::Reference< AccessibleCell > xAccCell;
AccessibleCell* pAccCell = nullptr;
SvxTableController* pController = getTableController();
if (pController)

View File

@ -293,7 +293,7 @@ bool SvxXMLXTableExportComponent::save(
// Finally do the export
const OUString aName;
uno::Reference< SvxXMLXTableExportComponent > xExporter( new SvxXMLXTableExportComponent( xContext, aName, xHandler, xTable, xGrfResolver ) );
rtl::Reference< SvxXMLXTableExportComponent > xExporter( new SvxXMLXTableExportComponent( xContext, aName, xHandler, xTable, xGrfResolver ) );
bRet = xExporter->exportTable();
if( pGraphicHelper )

View File

@ -502,7 +502,7 @@ static sal_uInt8 lcl_TryMergeLines(
* @param[in] rEnd ending point of merged primitive
* @return merged primitive
**/
static css::uno::Reference<BorderLinePrimitive2D>
static rtl::Reference<BorderLinePrimitive2D>
lcl_MergeBorderLines(
BorderLinePrimitive2D const& rLine, BorderLinePrimitive2D const& rOther,
basegfx::B2DPoint const& rStart, basegfx::B2DPoint const& rEnd)
@ -530,7 +530,7 @@ lcl_MergeBorderLines(
* @return merged borderline including the two input primitive, if they can be merged
* 0, otherwise
**/
static css::uno::Reference<BorderLinePrimitive2D>
static rtl::Reference<BorderLinePrimitive2D>
lcl_TryMergeBorderLine(BorderLinePrimitive2D const& rThis,
BorderLinePrimitive2D const& rOther,
SwPaintProperties& properties)
@ -586,7 +586,7 @@ lcl_TryMergeBorderLine(BorderLinePrimitive2D const& rThis,
rThis.getStart().getX(), rThis.getStart().getY());
basegfx::B2DPoint const end(
rOther.getEnd().getX(), rOther.getEnd().getY());
return lcl_MergeBorderLines(rThis, rOther, start, end);
return lcl_MergeBorderLines(rThis, rOther, start, end).get();
}
// The merged primitive starts with rOther and ends with rThis
else if(nRet == 2)
@ -595,7 +595,7 @@ lcl_TryMergeBorderLine(BorderLinePrimitive2D const& rThis,
rOther.getStart().getX(), rOther.getStart().getY());
basegfx::B2DPoint const end(
rThis.getEnd().getX(), rThis.getEnd().getY());
return lcl_MergeBorderLines(rOther, rThis, start, end);
return lcl_MergeBorderLines(rOther, rThis, start, end).get();
}
}
return nullptr;
@ -607,11 +607,11 @@ void BorderLines::AddBorderLine(
for (drawinglayer::primitive2d::Primitive2DContainer::reverse_iterator it = m_Lines.rbegin(); it != m_Lines.rend();
++it)
{
css::uno::Reference<BorderLinePrimitive2D> const xMerged(
lcl_TryMergeBorderLine(*static_cast<BorderLinePrimitive2D*>((*it).get()), *xLine.get(), properties));
rtl::Reference<BorderLinePrimitive2D> const xMerged(
lcl_TryMergeBorderLine(*static_cast<BorderLinePrimitive2D*>((*it).get()), *xLine.get(), properties).get());
if (xMerged.is())
{
*it = xMerged; // replace existing line with merged
*it = xMerged.get(); // replace existing line with merged
return;
}
}
@ -4918,7 +4918,7 @@ static void lcl_MakeBorderLine(SwRect const& rRect,
Color const aLeftColor = rBorder.GetColorOut(isLeftOrTopBorder);
Color const aRightColor = rBorder.GetColorIn(isLeftOrTopBorder);
css::uno::Reference<BorderLinePrimitive2D> const xLine =
rtl::Reference<BorderLinePrimitive2D> const xLine =
new BorderLinePrimitive2D(
aStart, aEnd, nLeftWidth, rBorder.GetDistance(), nRightWidth,
nExtentLeftStart, nExtentLeftEnd,
@ -4926,7 +4926,7 @@ static void lcl_MakeBorderLine(SwRect const& rRect,
aLeftColor.getBColor(), aRightColor.getBColor(),
rBorder.GetColorGap().getBColor(), rBorder.HasGapColor(),
rBorder.GetBorderLineStyle() );
properties.pBLines->AddBorderLine(xLine, properties);
properties.pBLines->AddBorderLine(xLine.get(), properties);
}
/**

View File

@ -369,7 +369,7 @@ sal_uLong SwXMLTextBlocks::PutBlockText( const OUString& rShort, const OUString&
uno::Reference<xml::sax::XDocumentHandler> xHandler(xWriter,
uno::UNO_QUERY);
uno::Reference<SwXMLTextBlockExport> xExp( new SwXMLTextBlockExport( xContext, *this, GetXMLToken ( XML_UNFORMATTED_TEXT ), xHandler) );
rtl::Reference<SwXMLTextBlockExport> xExp( new SwXMLTextBlockExport( xContext, *this, GetXMLToken ( XML_UNFORMATTED_TEXT ), xHandler) );
xExp->exportDoc( rText );
@ -488,7 +488,7 @@ void SwXMLTextBlocks::WriteInfo()
uno::Reference<xml::sax::XDocumentHandler> xHandler(xWriter, uno::UNO_QUERY);
uno::Reference<SwXMLBlockListExport> xExp(new SwXMLBlockListExport( xContext, *this, OUString(XMLN_BLOCKLIST), xHandler) );
rtl::Reference<SwXMLBlockListExport> xExp(new SwXMLBlockListExport( xContext, *this, OUString(XMLN_BLOCKLIST), xHandler) );
xExp->exportDoc( XML_BLOCK_LIST );

View File

@ -646,7 +646,7 @@ public:
bool m_bIsDisposed;
bool m_bIsDescriptor;
uno::Reference<text::XText> m_xParentText;
uno::Reference<SwXMetaText> m_xText;
rtl::Reference<SwXMetaText> m_xText;
Impl( SwXMeta & rThis, SwDoc & rDoc,
::sw::Meta * const pMeta,

View File

@ -338,7 +338,7 @@ void DocxAttributeOutput::StartParagraph( ww8::WW8TableNodeInfo::Pointer_t pText
m_bIsFirstParagraph = false;
}
static void lcl_deleteAndResetTheLists( uno::Reference<sax_fastparser::FastAttributeList>& pSdtPrTokenChildren, uno::Reference<sax_fastparser::FastAttributeList>& pSdtPrDataBindingAttrs, OUString& rSdtPrAlias)
static void lcl_deleteAndResetTheLists( rtl::Reference<sax_fastparser::FastAttributeList>& pSdtPrTokenChildren, rtl::Reference<sax_fastparser::FastAttributeList>& pSdtPrDataBindingAttrs, OUString& rSdtPrAlias)
{
if( pSdtPrTokenChildren.is() )
pSdtPrTokenChildren.clear();
@ -607,9 +607,9 @@ void DocxAttributeOutput::EndParagraph( ww8::WW8TableNodeInfoInner::Pointer_t pT
}
void DocxAttributeOutput::WriteSdtBlock( sal_Int32& nSdtPrToken,
uno::Reference<sax_fastparser::FastAttributeList>& pSdtPrTokenChildren,
uno::Reference<sax_fastparser::FastAttributeList>& pSdtPrTokenAttributes,
uno::Reference<sax_fastparser::FastAttributeList>& pSdtPrDataBindingAttrs,
rtl::Reference<sax_fastparser::FastAttributeList>& pSdtPrTokenChildren,
rtl::Reference<sax_fastparser::FastAttributeList>& pSdtPrTokenAttributes,
rtl::Reference<sax_fastparser::FastAttributeList>& pSdtPrDataBindingAttrs,
OUString& rSdtPrAlias,
bool bPara )
{
@ -629,7 +629,7 @@ void DocxAttributeOutput::WriteSdtBlock( sal_Int32& nSdtPrToken,
m_pSerializer->startElement( nSdtPrToken, FSEND );
else
{
XFastAttributeListRef xAttrList(pSdtPrTokenAttributes);
XFastAttributeListRef xAttrList(pSdtPrTokenAttributes.get());
pSdtPrTokenAttributes.clear();
m_pSerializer->startElement(nSdtPrToken, xAttrList);
}
@ -651,7 +651,7 @@ void DocxAttributeOutput::WriteSdtBlock( sal_Int32& nSdtPrToken,
m_pSerializer->singleElement( nSdtPrToken, FSEND );
else
{
XFastAttributeListRef xAttrList(pSdtPrTokenAttributes);
XFastAttributeListRef xAttrList(pSdtPrTokenAttributes.get());
pSdtPrTokenAttributes.clear();
m_pSerializer->singleElement(nSdtPrToken, xAttrList);
}
@ -665,7 +665,7 @@ void DocxAttributeOutput::WriteSdtBlock( sal_Int32& nSdtPrToken,
if( pSdtPrDataBindingAttrs.is() && !m_rExport.SdrExporter().IsParagraphHasDrawing())
{
XFastAttributeListRef xAttrList( pSdtPrDataBindingAttrs );
XFastAttributeListRef xAttrList( pSdtPrDataBindingAttrs.get() );
pSdtPrDataBindingAttrs.clear();
m_pSerializer->singleElementNS( XML_w, XML_dataBinding, xAttrList );
}
@ -907,7 +907,7 @@ void DocxAttributeOutput::WriteCollectedParagraphProperties()
{
if ( m_rExport.SdrExporter().getFlyAttrList().is() )
{
XFastAttributeListRef xAttrList( m_rExport.SdrExporter().getFlyAttrList() );
XFastAttributeListRef xAttrList( m_rExport.SdrExporter().getFlyAttrList().get() );
m_rExport.SdrExporter().getFlyAttrList().clear();
m_pSerializer->singleElementNS( XML_w, XML_framePr, xAttrList );
@ -915,7 +915,7 @@ void DocxAttributeOutput::WriteCollectedParagraphProperties()
if ( m_pParagraphSpacingAttrList.is() )
{
XFastAttributeListRef xAttrList( m_pParagraphSpacingAttrList );
XFastAttributeListRef xAttrList( m_pParagraphSpacingAttrList.get() );
m_pParagraphSpacingAttrList.clear();
m_pSerializer->singleElementNS( XML_w, XML_spacing, xAttrList );
@ -923,7 +923,7 @@ void DocxAttributeOutput::WriteCollectedParagraphProperties()
if ( m_pBackgroundAttrList.is() )
{
XFastAttributeListRef xAttrList( m_pBackgroundAttrList );
XFastAttributeListRef xAttrList( m_pBackgroundAttrList.get() );
m_pBackgroundAttrList.clear();
m_pSerializer->singleElementNS( XML_w, XML_shd, xAttrList );
@ -992,11 +992,11 @@ void DocxAttributeOutput::EndParagraphProperties(const SfxItemSet& rParagraphMar
// to the DOCX when the function 'WriteCollectedRunProperties' gets called.
// So we need to store the current status of these lists, so that we can revert back to them when
// we are done exporting the redline attributes.
uno::Reference<sax_fastparser::FastAttributeList> pFontsAttrList_Original(m_pFontsAttrList);
rtl::Reference<sax_fastparser::FastAttributeList> pFontsAttrList_Original(m_pFontsAttrList);
m_pFontsAttrList.clear();
uno::Reference<sax_fastparser::FastAttributeList> pEastAsianLayoutAttrList_Original(m_pEastAsianLayoutAttrList);
rtl::Reference<sax_fastparser::FastAttributeList> pEastAsianLayoutAttrList_Original(m_pEastAsianLayoutAttrList);
m_pEastAsianLayoutAttrList.clear();
uno::Reference<sax_fastparser::FastAttributeList> pCharLangAttrList_Original(m_pCharLangAttrList);
rtl::Reference<sax_fastparser::FastAttributeList> pCharLangAttrList_Original(m_pCharLangAttrList);
m_pCharLangAttrList.clear();
lcl_writeParagraphMarkerProperties(*this, rParagraphMarkerProperties);
@ -1005,9 +1005,9 @@ void DocxAttributeOutput::EndParagraphProperties(const SfxItemSet& rParagraphMar
WriteCollectedRunProperties();
// Revert back the original values that were stored in 'm_pFontsAttrList', 'm_pEastAsianLayoutAttrList', 'm_pCharLangAttrList'
m_pFontsAttrList = pFontsAttrList_Original;
m_pEastAsianLayoutAttrList = pEastAsianLayoutAttrList_Original;
m_pCharLangAttrList = pCharLangAttrList_Original;
m_pFontsAttrList = pFontsAttrList_Original.get();
m_pEastAsianLayoutAttrList = pEastAsianLayoutAttrList_Original.get();
m_pCharLangAttrList = pCharLangAttrList_Original.get();
if ( pRedlineParagraphMarkerDeleted )
{
@ -1209,7 +1209,7 @@ void DocxAttributeOutput::EndRun()
// Start the hyperlink after the fields separators or we would generate invalid file
if ( m_pHyperlinkAttrList.is() )
{
XFastAttributeListRef xAttrList ( m_pHyperlinkAttrList );
XFastAttributeListRef xAttrList ( m_pHyperlinkAttrList.get() );
m_pHyperlinkAttrList.clear();
m_pSerializer->startElementNS( XML_w, XML_hyperlink, xAttrList );
@ -1277,7 +1277,7 @@ void DocxAttributeOutput::EndRun()
// (so on export sdt blocks are never nested ATM)
if ( !m_bAnchorLinkedToNode && !m_bStartedCharSdt )
{
uno::Reference<sax_fastparser::FastAttributeList> pRunSdtPrTokenAttributes;
rtl::Reference<sax_fastparser::FastAttributeList> pRunSdtPrTokenAttributes;
WriteSdtBlock( m_nRunSdtPrToken, m_pRunSdtPrTokenChildren, pRunSdtPrTokenAttributes, m_pRunSdtPrDataBindingAttrs, m_aRunSdtPrAlias, /*bPara=*/false );
}
else
@ -1969,14 +1969,14 @@ void DocxAttributeOutput::WriteCollectedRunProperties()
// Write all differed properties
if ( m_pFontsAttrList.is() )
{
XFastAttributeListRef xAttrList( m_pFontsAttrList );
XFastAttributeListRef xAttrList( m_pFontsAttrList.get() );
m_pFontsAttrList.clear();
m_pSerializer->singleElementNS( XML_w, XML_rFonts, xAttrList );
}
if ( m_pColorAttrList.is() )
{
XFastAttributeListRef xAttrList( m_pColorAttrList );
XFastAttributeListRef xAttrList( m_pColorAttrList.get() );
m_pColorAttrList.clear();
m_pSerializer->singleElementNS( XML_w, XML_color, xAttrList );
@ -1984,14 +1984,14 @@ void DocxAttributeOutput::WriteCollectedRunProperties()
if ( m_pEastAsianLayoutAttrList.is() )
{
XFastAttributeListRef xAttrList( m_pEastAsianLayoutAttrList );
XFastAttributeListRef xAttrList( m_pEastAsianLayoutAttrList.get() );
m_pEastAsianLayoutAttrList.clear();
m_pSerializer->singleElementNS( XML_w, XML_eastAsianLayout, xAttrList );
}
if ( m_pCharLangAttrList.is() )
{
XFastAttributeListRef xAttrList( m_pCharLangAttrList );
XFastAttributeListRef xAttrList( m_pCharLangAttrList.get() );
m_pCharLangAttrList.clear();
m_pSerializer->singleElementNS( XML_w, XML_lang, xAttrList );
}
@ -2430,11 +2430,11 @@ void DocxAttributeOutput::Redline( const SwRedlineData* pRedlineData)
// to the DOCX when the function 'WriteCollectedRunProperties' gets called.
// So we need to store the current status of these lists, so that we can revert back to them when
// we are done exporting the redline attributes.
uno::Reference<sax_fastparser::FastAttributeList> pFontsAttrList_Original(m_pFontsAttrList);
rtl::Reference<sax_fastparser::FastAttributeList> pFontsAttrList_Original(m_pFontsAttrList);
m_pFontsAttrList.clear();
uno::Reference<sax_fastparser::FastAttributeList> pEastAsianLayoutAttrList_Original(m_pEastAsianLayoutAttrList);
rtl::Reference<sax_fastparser::FastAttributeList> pEastAsianLayoutAttrList_Original(m_pEastAsianLayoutAttrList);
m_pEastAsianLayoutAttrList.clear();
uno::Reference<sax_fastparser::FastAttributeList> pCharLangAttrList_Original(m_pCharLangAttrList);
rtl::Reference<sax_fastparser::FastAttributeList> pCharLangAttrList_Original(m_pCharLangAttrList);
m_pCharLangAttrList.clear();
// Output the redline item set
@ -2486,9 +2486,9 @@ void DocxAttributeOutput::Redline( const SwRedlineData* pRedlineData)
// to the DOCX when the function 'WriteCollectedParagraphProperties' gets called.
// So we need to store the current status of these lists, so that we can revert back to them when
// we are done exporting the redline attributes.
uno::Reference<sax_fastparser::FastAttributeList> pFlyAttrList_Original(m_rExport.SdrExporter().getFlyAttrList());
rtl::Reference<sax_fastparser::FastAttributeList> pFlyAttrList_Original(m_rExport.SdrExporter().getFlyAttrList());
m_rExport.SdrExporter().getFlyAttrList().clear();
uno::Reference<sax_fastparser::FastAttributeList> pParagraphSpacingAttrList_Original(m_pParagraphSpacingAttrList);
rtl::Reference<sax_fastparser::FastAttributeList> pParagraphSpacingAttrList_Original(m_pParagraphSpacingAttrList);
m_pParagraphSpacingAttrList.clear();
// Output the redline item set
@ -3506,7 +3506,7 @@ void DocxAttributeOutput::TableBackgrounds( ww8::WW8TableNodeInfoInner::Pointer_
}
else
{
css::uno::Reference<sax_fastparser::FastAttributeList> pAttrList;
rtl::Reference<sax_fastparser::FastAttributeList> pAttrList;
for( aGrabBagElement = aGrabBag.begin(); aGrabBagElement != aGrabBag.end(); ++aGrabBagElement )
{
@ -3533,7 +3533,7 @@ void DocxAttributeOutput::TableBackgrounds( ww8::WW8TableNodeInfoInner::Pointer_
else if( aGrabBagElement->first == "val")
AddToAttrList( pAttrList, FSNS( XML_w, XML_val ), sValue.getStr() );
}
m_pSerializer->singleElementNS( XML_w, XML_shd, pAttrList );
m_pSerializer->singleElementNS( XML_w, XML_shd, pAttrList.get() );
}
}
@ -5495,7 +5495,7 @@ void DocxAttributeOutput::EndSection()
// Write the section properties
if ( m_pSectionSpacingAttrList.is() )
{
XFastAttributeListRef xAttrList( m_pSectionSpacingAttrList );
XFastAttributeListRef xAttrList( m_pSectionSpacingAttrList.get() );
m_pSectionSpacingAttrList.clear();
m_pSerializer->singleElementNS( XML_w, XML_pgMar, xAttrList );
@ -8550,12 +8550,12 @@ void DocxAttributeOutput::BulletDefinition(int nId, const Graphic& rGraphic, Siz
m_pSerializer->endElementNS(XML_w, XML_numPicBullet);
}
void DocxAttributeOutput::AddToAttrList( uno::Reference<sax_fastparser::FastAttributeList>& pAttrList, sal_Int32 nAttrName, const sal_Char* sAttrValue )
void DocxAttributeOutput::AddToAttrList( rtl::Reference<sax_fastparser::FastAttributeList>& pAttrList, sal_Int32 nAttrName, const sal_Char* sAttrValue )
{
AddToAttrList( pAttrList, 1, nAttrName, sAttrValue );
}
void DocxAttributeOutput::AddToAttrList( uno::Reference<sax_fastparser::FastAttributeList>& pAttrList, sal_Int32 nAttrs, ... )
void DocxAttributeOutput::AddToAttrList( rtl::Reference<sax_fastparser::FastAttributeList>& pAttrList, sal_Int32 nAttrs, ... )
{
if( !pAttrList.is() )
pAttrList = FastSerializerHelper::createAttrList();

View File

@ -704,9 +704,9 @@ private:
void WritePostponedCustomShape();
void WriteSdtBlock(sal_Int32& nSdtPrToken,
css::uno::Reference<sax_fastparser::FastAttributeList>& pSdtPrTokenChildren,
css::uno::Reference<sax_fastparser::FastAttributeList>& pSdtPrTokenAttributes,
css::uno::Reference<sax_fastparser::FastAttributeList>& pSdtPrDataBindingAttrs,
rtl::Reference<sax_fastparser::FastAttributeList>& pSdtPrTokenChildren,
rtl::Reference<sax_fastparser::FastAttributeList>& pSdtPrTokenAttributes,
rtl::Reference<sax_fastparser::FastAttributeList>& pSdtPrDataBindingAttrs,
OUString& rSdtPrAlias,
bool bPara);
/// Closes a currently open SDT block.
@ -717,15 +717,15 @@ private:
void CmdField_Impl( FieldInfos& rInfos );
void EndField_Impl( FieldInfos& rInfos );
static void AddToAttrList( css::uno::Reference<sax_fastparser::FastAttributeList>& pAttrList, sal_Int32 nAttrName, const sal_Char* sAttrValue );
static void AddToAttrList( css::uno::Reference<sax_fastparser::FastAttributeList>& pAttrList, sal_Int32 nArgs, ... );
static void AddToAttrList( rtl::Reference<sax_fastparser::FastAttributeList>& pAttrList, sal_Int32 nAttrName, const sal_Char* sAttrValue );
static void AddToAttrList( rtl::Reference<sax_fastparser::FastAttributeList>& pAttrList, sal_Int32 nArgs, ... );
css::uno::Reference<sax_fastparser::FastAttributeList> m_pFontsAttrList;
css::uno::Reference<sax_fastparser::FastAttributeList> m_pEastAsianLayoutAttrList;
css::uno::Reference<sax_fastparser::FastAttributeList> m_pCharLangAttrList;
css::uno::Reference<sax_fastparser::FastAttributeList> m_pSectionSpacingAttrList;
css::uno::Reference<sax_fastparser::FastAttributeList> m_pParagraphSpacingAttrList;
css::uno::Reference<sax_fastparser::FastAttributeList> m_pHyperlinkAttrList;
rtl::Reference<sax_fastparser::FastAttributeList> m_pFontsAttrList;
rtl::Reference<sax_fastparser::FastAttributeList> m_pEastAsianLayoutAttrList;
rtl::Reference<sax_fastparser::FastAttributeList> m_pCharLangAttrList;
rtl::Reference<sax_fastparser::FastAttributeList> m_pSectionSpacingAttrList;
rtl::Reference<sax_fastparser::FastAttributeList> m_pParagraphSpacingAttrList;
rtl::Reference<sax_fastparser::FastAttributeList> m_pHyperlinkAttrList;
/// If the current SDT around runs should be ended before the current run.
bool m_bEndCharSdt;
/// If an SDT around runs is currently open.
@ -733,9 +733,9 @@ private:
/// If an SDT around paragraphs is currently open.
bool m_bStartedParaSdt;
/// Attributes of the run color
css::uno::Reference<sax_fastparser::FastAttributeList> m_pColorAttrList;
rtl::Reference<sax_fastparser::FastAttributeList> m_pColorAttrList;
/// Attributes of the paragraph background
css::uno::Reference<sax_fastparser::FastAttributeList> m_pBackgroundAttrList;
rtl::Reference<sax_fastparser::FastAttributeList> m_pBackgroundAttrList;
OUString m_sOriginalBackgroundColor;
OUString m_hyperLinkAnchor;
bool m_endPageRef;
@ -917,15 +917,15 @@ private:
/// members to control the existence of grabbagged SDT properties in the paragraph
sal_Int32 m_nParagraphSdtPrToken;
css::uno::Reference<sax_fastparser::FastAttributeList> m_pParagraphSdtPrTokenChildren;
css::uno::Reference<sax_fastparser::FastAttributeList> m_pParagraphSdtPrTokenAttributes;
css::uno::Reference<sax_fastparser::FastAttributeList> m_pParagraphSdtPrDataBindingAttrs;
rtl::Reference<sax_fastparser::FastAttributeList> m_pParagraphSdtPrTokenChildren;
rtl::Reference<sax_fastparser::FastAttributeList> m_pParagraphSdtPrTokenAttributes;
rtl::Reference<sax_fastparser::FastAttributeList> m_pParagraphSdtPrDataBindingAttrs;
/// members to control the existence of grabbagged SDT properties in the text run
sal_Int32 m_nRunSdtPrToken;
/// State of the Fly at current position
FlyProcessingState m_nStateOfFlyFrame;
css::uno::Reference<sax_fastparser::FastAttributeList> m_pRunSdtPrTokenChildren;
css::uno::Reference<sax_fastparser::FastAttributeList> m_pRunSdtPrDataBindingAttrs;
rtl::Reference<sax_fastparser::FastAttributeList> m_pRunSdtPrTokenChildren;
rtl::Reference<sax_fastparser::FastAttributeList> m_pRunSdtPrDataBindingAttrs;
/// Value of the <w:alias> paragraph SDT element.
OUString m_aParagraphSdtPrAlias;
/// Same as m_aParagraphSdtPrAlias, but its content is available till the SDT is closed.

View File

@ -131,18 +131,18 @@ struct DocxSdrExport::Impl
const Size* m_pFlyFrameSize;
bool m_bTextFrameSyntax;
bool m_bDMLTextFrameSyntax;
uno::Reference<sax_fastparser::FastAttributeList> m_pFlyAttrList;
uno::Reference<sax_fastparser::FastAttributeList> m_pTextboxAttrList;
rtl::Reference<sax_fastparser::FastAttributeList> m_pFlyAttrList;
rtl::Reference<sax_fastparser::FastAttributeList> m_pTextboxAttrList;
OStringBuffer m_aTextFrameStyle;
bool m_bFrameBtLr;
bool m_bDrawingOpen;
bool m_bParagraphSdtOpen;
bool m_bParagraphHasDrawing; ///Flag for checking drawing in a paragraph.
bool m_bFlyFrameGraphic;
css::uno::Reference<sax_fastparser::FastAttributeList> m_pFlyFillAttrList;
rtl::Reference<sax_fastparser::FastAttributeList> m_pFlyFillAttrList;
sax_fastparser::FastAttributeList* m_pFlyWrapAttrList;
sax_fastparser::FastAttributeList* m_pBodyPrAttrList;
css::uno::Reference<sax_fastparser::FastAttributeList> m_pDashLineStyleAttr;
rtl::Reference<sax_fastparser::FastAttributeList> m_pDashLineStyleAttr;
bool m_bDMLAndVMLDrawingOpen;
/// List of TextBoxes in this document: they are exported as part of their shape, never alone.
std::set<const SwFrameFormat*> m_aTextBoxes;
@ -211,12 +211,12 @@ bool DocxSdrExport::getDMLTextFrameSyntax()
return m_pImpl->m_bDMLTextFrameSyntax;
}
uno::Reference<sax_fastparser::FastAttributeList>& DocxSdrExport::getFlyAttrList()
rtl::Reference<sax_fastparser::FastAttributeList>& DocxSdrExport::getFlyAttrList()
{
return m_pImpl->m_pFlyAttrList;
}
uno::Reference<sax_fastparser::FastAttributeList>& DocxSdrExport::getTextboxAttrList()
rtl::Reference<sax_fastparser::FastAttributeList>& DocxSdrExport::getTextboxAttrList()
{
return m_pImpl->m_pTextboxAttrList;
}
@ -256,7 +256,7 @@ void DocxSdrExport::setParagraphHasDrawing(bool bParagraphHasDrawing)
m_pImpl->m_bParagraphHasDrawing = bParagraphHasDrawing;
}
uno::Reference<sax_fastparser::FastAttributeList>& DocxSdrExport::getFlyFillAttrList()
rtl::Reference<sax_fastparser::FastAttributeList>& DocxSdrExport::getFlyFillAttrList()
{
return m_pImpl->m_pFlyFillAttrList;
}
@ -271,7 +271,7 @@ sax_fastparser::FastAttributeList* DocxSdrExport::getBodyPrAttrList()
return m_pImpl->m_pBodyPrAttrList;
}
uno::Reference<sax_fastparser::FastAttributeList>& DocxSdrExport::getDashLineStyle()
rtl::Reference<sax_fastparser::FastAttributeList>& DocxSdrExport::getDashLineStyle()
{
return m_pImpl->m_pDashLineStyleAttr;
}

View File

@ -15,6 +15,7 @@
#include <com/sun/star/xml/dom/XDocument.hpp>
#include <rtl/strbuf.hxx>
#include <rtl/ref.hxx>
#include <sax/fshelper.hxx>
#include <tools/solar.h>
@ -63,9 +64,9 @@ public:
const Size* getFlyFrameSize();
bool getTextFrameSyntax();
bool getDMLTextFrameSyntax();
css::uno::Reference<sax_fastparser::FastAttributeList>& getFlyAttrList();
rtl::Reference<sax_fastparser::FastAttributeList>& getFlyAttrList();
/// Attributes of the next v:textbox element.
css::uno::Reference<sax_fastparser::FastAttributeList>& getTextboxAttrList();
rtl::Reference<sax_fastparser::FastAttributeList>& getTextboxAttrList();
OStringBuffer& getTextFrameStyle();
/// Same, as DocxAttributeOutput::m_bBtLr, but for textframe rotation.
bool getFrameBtLr();
@ -77,12 +78,12 @@ public:
bool IsDMLAndVMLDrawingOpen();
bool IsParagraphHasDrawing();
void setParagraphHasDrawing(bool bParagraphHasDrawing);
css::uno::Reference<sax_fastparser::FastAttributeList>& getFlyFillAttrList();
rtl::Reference<sax_fastparser::FastAttributeList>& getFlyFillAttrList();
sax_fastparser::FastAttributeList* getFlyWrapAttrList();
void setFlyWrapAttrList(sax_fastparser::FastAttributeList* pAttrList);
/// Attributes of <wps:bodyPr>, used during DML export of text frames.
sax_fastparser::FastAttributeList* getBodyPrAttrList();
css::uno::Reference<sax_fastparser::FastAttributeList>& getDashLineStyle();
rtl::Reference<sax_fastparser::FastAttributeList>& getDashLineStyle();
void startDMLAnchorInline(const SwFrameFormat* pFrameFormat, const Size& rSize);
void endDMLAnchorInline(const SwFrameFormat* pFrameFormat);

View File

@ -44,7 +44,7 @@ SwVbaWindow::SwVbaWindow(
void
SwVbaWindow::Activate() throw (css::uno::RuntimeException, std::exception)
{
uno::Reference<SwVbaDocument> document( new SwVbaDocument(uno::Reference< XHelperInterface >( Application(), uno::UNO_QUERY_THROW ), mxContext, m_xModel) );
rtl::Reference<SwVbaDocument> document( new SwVbaDocument(uno::Reference< XHelperInterface >( Application(), uno::UNO_QUERY_THROW ), mxContext, m_xModel) );
document->Activate();
}
@ -53,7 +53,7 @@ void
SwVbaWindow::Close( const uno::Any& SaveChanges, const uno::Any& RouteDocument ) throw (uno::RuntimeException, std::exception)
{
// FIXME: it is incorrect when there are more than 1 windows
uno::Reference<SwVbaDocument> document( new SwVbaDocument(uno::Reference< XHelperInterface >( Application(), uno::UNO_QUERY_THROW ), mxContext, m_xModel) );
rtl::Reference<SwVbaDocument> document( new SwVbaDocument(uno::Reference< XHelperInterface >( Application(), uno::UNO_QUERY_THROW ), mxContext, m_xModel) );
uno::Any FileName;
document->Close(SaveChanges, FileName, RouteDocument );
}
@ -69,7 +69,7 @@ void SAL_CALL SwVbaWindow::setView( const uno::Any& _view ) throw (uno::RuntimeE
sal_Int32 nType = 0;
if( _view >>= nType )
{
uno::Reference<SwVbaView> view( new SwVbaView(this, mxContext, m_xModel) );
rtl::Reference<SwVbaView> view( new SwVbaView(this, mxContext, m_xModel) );
view->setType( nType );
}
}

View File

@ -426,7 +426,7 @@ void ExportStoredChapterNumberingRules(SwChapterNumRules & rRules,
uno::Reference<xml::sax::XDocumentHandler> const xHandler(
xWriter, uno::UNO_QUERY);
uno::Reference<StoredChapterNumberingExport> exp(new StoredChapterNumberingExport(xContext, rFileName, xWriter));
rtl::Reference<StoredChapterNumberingExport> exp(new StoredChapterNumberingExport(xContext, rFileName, xWriter));
// if style name contains a space then name != display-name
// ... and the import needs to map from name to display-name then!

View File

@ -465,7 +465,7 @@ void SwDBTreeList::StartDrag( sal_Int8 /*nAction*/, const Point& /*rPosPixel*/ )
if( !sColumnName.isEmpty() )
{
// drag database field
uno::Reference< svx::OColumnTransferable > xColTransfer( new svx::OColumnTransferable(
rtl::Reference< svx::OColumnTransferable > xColTransfer( new svx::OColumnTransferable(
sDBName,
OUString(),
sTableName,

View File

@ -539,7 +539,7 @@ namespace cmis
aParentUrl.removeSegment( );
OUString sParentUrl = aParentUrl.GetMainURL( INetURLObject::NO_DECODE );
uno::Reference<Content> xParent( new Content(m_xContext, m_pProvider, new ucbhelper::ContentIdentifier( sParentUrl )) );
rtl::Reference<Content> xParent( new Content(m_xContext, m_pProvider, new ucbhelper::ContentIdentifier( sParentUrl )) );
libcmis::FolderPtr pParentFolder = boost::dynamic_pointer_cast< libcmis::Folder >( xParent->getObject( xEnv ) );
if ( pParentFolder )
{

View File

@ -37,7 +37,7 @@ namespace gio
typedef std::vector< ResultListEntry* > ResultList;
DataSupplier::DataSupplier( const uno::Reference< ::gio::Content >& rContent, sal_Int32 nOpenMode )
DataSupplier::DataSupplier( const rtl::Reference< ::gio::Content >& rContent, sal_Int32 nOpenMode )
: mxContent(rContent), mnOpenMode(nOpenMode), mbCountFinal(false)
{
}

View File

@ -53,13 +53,13 @@ typedef std::vector< ResultListEntry* > ResultList;
class DataSupplier : public ucbhelper::ResultSetDataSupplier
{
private:
css::uno::Reference< ::gio::Content > mxContent;
rtl::Reference< ::gio::Content > mxContent;
sal_Int32 mnOpenMode;
bool mbCountFinal;
bool getData();
ResultList maResults;
public:
DataSupplier( const css::uno::Reference< Content >& rContent, sal_Int32 nOpenMode );
DataSupplier( const rtl::Reference< Content >& rContent, sal_Int32 nOpenMode );
virtual ~DataSupplier();
virtual OUString queryContentIdentifierString( sal_uInt32 nIndex ) override;

View File

@ -117,7 +117,7 @@ static void ooo_mount_operation_ask_password (GMountOperation *op,
if (default_domain)
aDomain = OUString(default_domain, strlen(default_domain), RTL_TEXTENCODING_UTF8);
uno::Reference< ucbhelper::SimpleAuthenticationRequest > xRequest
rtl::Reference< ucbhelper::SimpleAuthenticationRequest > xRequest
= new ucbhelper::SimpleAuthenticationRequest (OUString() /* FIXME: provide URL here */, aHostName, eDomain, aDomain, eUserName, aUserName, ePassword, aPassword);
xIH->handle( xRequest.get() );

View File

@ -29,7 +29,7 @@ using namespace gio;
DynamicResultSet::DynamicResultSet(
const Reference< XComponentContext >& rxContext,
const Reference< Content >& rxContent,
const rtl::Reference< Content >& rxContent,
const OpenCommandArgument2& rCommand,
const Reference< XCommandEnvironment >& rxEnv )
: ResultSetImplHelper( rxContext, rCommand ),

View File

@ -28,7 +28,7 @@ namespace gio
class DynamicResultSet : public ::ucbhelper::ResultSetImplHelper
{
css::uno::Reference< Content > m_xContent;
rtl::Reference< Content > m_xContent;
css::uno::Reference< css::ucb::XCommandEnvironment > m_xEnv;
private:
@ -38,7 +38,7 @@ namespace gio
public:
DynamicResultSet(
const css::uno::Reference< css::uno::XComponentContext >& rxContext,
const css::uno::Reference< Content >& rxContent,
const rtl::Reference< Content >& rxContent,
const css::ucb::OpenCommandArgument2& rCommand,
const css::uno::Reference< css::ucb::XCommandEnvironment >& rxEnv );
};

View File

@ -174,7 +174,7 @@ StorageElementFactory::createStorage( const OUString & rUri,
bool bWritable = ( ( eMode == READ_WRITE_NOCREATE )
|| ( eMode == READ_WRITE_CREATE ) );
uno::Reference< Storage > xElement(
rtl::Reference< Storage > xElement(
new Storage( m_xContext, this, aUriKey, xParentStorage, xStorage ) );
aIt = m_aMap.insert(

View File

@ -39,6 +39,7 @@
#include <oox/ole/vbaproject.hxx>
#include <ooxml/OOXMLDocument.hxx>
#include <unotools/mediadescriptor.hxx>
#include <rtl/ref.hxx>
using namespace ::com::sun::star;
@ -158,7 +159,7 @@ sal_Bool WriterFilter::filter(const uno::Sequence< beans::PropertyValue >& aDesc
try
{
// use the oox.core.FilterDetect implementation to extract the decrypted ZIP package
uno::Reference<::oox::core::FilterDetect> xDetector(new ::oox::core::FilterDetect(m_xContext));
rtl::Reference<::oox::core::FilterDetect> xDetector(new ::oox::core::FilterDetect(m_xContext));
xInputStream = xDetector->extractUnencryptedPackage(aMediaDesc);
}
catch (uno::Exception&)

View File

@ -42,6 +42,8 @@ OOXMLFastDocumentHandler::OOXMLFastDocumentHandler(
{
}
OOXMLFastDocumentHandler::~OOXMLFastDocumentHandler() {}
// css::xml::sax::XFastContextHandler:
void SAL_CALL OOXMLFastDocumentHandler::startFastElement
(::sal_Int32
@ -115,7 +117,7 @@ throw (uno::RuntimeException, xml::sax::SAXException, std::exception)
#endif
}
uno::Reference< OOXMLFastContextHandler >
rtl::Reference< OOXMLFastContextHandler >
OOXMLFastDocumentHandler::getContextHandler() const
{
if (!mxContextHandler.is())

View File

@ -25,6 +25,7 @@
#include <com/sun/star/xml/sax/XFastDocumentHandler.hpp>
#include <dmapper/resourcemodel.hxx>
#include <ooxml/OOXMLDocument.hxx>
#include <rtl/ref.hxx>
#include "OOXMLParserState.hxx"
namespace writerfilter {
@ -41,7 +42,7 @@ public:
Stream* pStream,
OOXMLDocumentImpl* pDocument,
sal_Int32 nXNoteId );
virtual ~OOXMLFastDocumentHandler() {}
virtual ~OOXMLFastDocumentHandler();
// css::xml::sax::XFastDocumentHandler:
virtual void SAL_CALL startDocument()
@ -93,8 +94,8 @@ private:
Stream * mpStream;
OOXMLDocumentImpl* mpDocument;
sal_Int32 mnXNoteId;
mutable css::uno::Reference<OOXMLFastContextHandler> mxContextHandler;
css::uno::Reference<OOXMLFastContextHandler> getContextHandler() const;
mutable rtl::Reference<OOXMLFastContextHandler> mxContextHandler;
rtl::Reference<OOXMLFastContextHandler> getContextHandler() const;
};
}}

View File

@ -350,7 +350,7 @@ void SAL_CALL XMLVersionListPersistence::store( const uno::Reference< embed::XSt
Reference< XDocumentHandler > xHandler( xWriter, uno::UNO_QUERY );
Reference< XMLVersionListExport > xExp( new XMLVersionListExport( xContext, rVersions, sVerName, xHandler ) );
rtl::Reference< XMLVersionListExport > xExp( new XMLVersionListExport( xContext, rVersions, sVerName, xHandler ) );
xExp->exportDoc( ::xmloff::token::XML_VERSION );