summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Tardon <dtardon@redhat.com>2016-09-06 16:12:40 +0200
committerDavid Tardon <dtardon@redhat.com>2016-09-09 07:30:30 +0200
commit32ccb4ea863651c22bf33cc15012971d2a2d2810 (patch)
tree83d5cdf806d72e9185b9177a558e0d5ebba373ad
parenta013b8505534896bc926e54116ef14e7879b0545 (diff)
resolve the snafu with 2 separate refcounted bases
Change-Id: Ia275596d54ea27436f03d01297fb78b6ca09e8a6
-rw-r--r--include/xmloff/prstylei.hxx4
-rw-r--r--include/xmloff/xmlictxt.hxx9
-rw-r--r--sc/source/filter/xml/xmlcvali.cxx4
-rw-r--r--sw/source/filter/xml/xmlitemi.cxx4
-rw-r--r--sw/source/filter/xml/xmltbli.cxx26
-rw-r--r--sw/source/filter/xml/xmltbli.hxx2
-rw-r--r--xmloff/source/core/xmlictxt.cxx15
-rw-r--r--xmloff/source/core/xmlimp.cxx44
-rw-r--r--xmloff/source/core/xmlmultiimagehelper.cxx6
-rw-r--r--xmloff/source/draw/XMLShapePropertySetContext.cxx4
-rw-r--r--xmloff/source/draw/ximpshap.cxx28
-rw-r--r--xmloff/source/style/XMLFontStylesContext_impl.hxx2
-rw-r--r--xmloff/source/style/prstylei.cxx12
-rw-r--r--xmloff/source/table/XMLTableImport.cxx2
-rw-r--r--xmloff/source/text/XMLIndexTOCContext.cxx8
-rw-r--r--xmloff/source/text/XMLTextFrameContext.cxx24
-rw-r--r--xmloff/source/text/XMLTextFrameHyperlinkContext.cxx12
-rw-r--r--xmloff/source/text/XMLTextListBlockContext.cxx6
-rw-r--r--xmloff/source/text/XMLTextShapeStyleContext.cxx4
-rw-r--r--xmloff/source/text/txtfldi.cxx4
-rw-r--r--xmloff/source/text/txtimp.cxx32
-rw-r--r--xmloff/source/text/txtlists.cxx10
-rw-r--r--xmloff/source/text/txtparaimphint.hxx8
23 files changed, 144 insertions, 126 deletions
diff --git a/include/xmloff/prstylei.hxx b/include/xmloff/prstylei.hxx
index 081ba36bc87d..9e334ac9d526 100644
--- a/include/xmloff/prstylei.hxx
+++ b/include/xmloff/prstylei.hxx
@@ -80,7 +80,7 @@ protected:
virtual void SetAttribute( sal_uInt16 nPrefixKey,
const OUString& rLocalName,
const OUString& rValue ) override;
- SvXMLStylesContext *GetStyles() { return static_cast<SvXMLStylesContext *>(&mxStyles); }
+ SvXMLStylesContext *GetStyles() { return static_cast<SvXMLStylesContext *>(mxStyles.get()); }
::std::vector< XMLPropertyState > & GetProperties() { return maProperties; }
// Override this method to create a new style. It's called by
@@ -106,7 +106,7 @@ public:
virtual void FillPropertySet(
const css::uno::Reference< css::beans::XPropertySet > & rPropSet );
- const SvXMLStylesContext *GetStyles() const { return static_cast<const SvXMLStylesContext *>(&mxStyles); }
+ const SvXMLStylesContext *GetStyles() const { return static_cast<const SvXMLStylesContext *>(mxStyles.get()); }
const ::std::vector< XMLPropertyState > & GetProperties() const { return maProperties; }
const css::uno::Reference< css::style::XStyle >&
diff --git a/include/xmloff/xmlictxt.hxx b/include/xmloff/xmlictxt.hxx
index cccfd9369c1a..c9d987e2fca1 100644
--- a/include/xmloff/xmlictxt.hxx
+++ b/include/xmloff/xmlictxt.hxx
@@ -34,8 +34,7 @@
class SvXMLNamespaceMap;
class SvXMLImport;
-class XMLOFF_DLLPUBLIC SvXMLImportContext : public SvRefBase,
- public ::cppu::WeakImplHelper1< ::css::xml::sax::XFastContextHandler >
+class XMLOFF_DLLPUBLIC SvXMLImportContext : public ::cppu::WeakImplHelper1< ::css::xml::sax::XFastContextHandler >
{
friend class SvXMLImport;
@@ -125,9 +124,13 @@ public:
// support multiple images and to rescue evtl. GluePoints imported with one of the
// to be deprecated contents
virtual void onDemandRescueUsefulDataFromTemporary( const SvXMLImportContext& rCandidate );
+
+ void AddFirstRef();
+ void AddNextRef();
+ void ReleaseRef();
};
-typedef tools::SvRef<SvXMLImportContext> SvXMLImportContextRef;
+typedef css::uno::Reference<SvXMLImportContext> SvXMLImportContextRef;
#endif // INCLUDED_XMLOFF_XMLICTXT_HXX
diff --git a/sc/source/filter/xml/xmlcvali.cxx b/sc/source/filter/xml/xmlcvali.cxx
index a8c768956d4e..1b52d6b1f4ca 100644
--- a/sc/source/filter/xml/xmlcvali.cxx
+++ b/sc/source/filter/xml/xmlcvali.cxx
@@ -403,11 +403,11 @@ void ScXMLContentValidationContext::GetCondition( ScMyImportValidation& rValidat
void ScXMLContentValidationContext::EndElement()
{
// #i36650# event-listeners element moved up one level
- if (xEventContext.Is())
+ if (xEventContext.is())
{
OUString sOnError("OnError");
XMLEventsImportContext* pEvents =
- static_cast<XMLEventsImportContext*>(&xEventContext);
+ static_cast<XMLEventsImportContext*>(xEventContext.get());
uno::Sequence<beans::PropertyValue> aValues;
pEvents->GetEventSequence( sOnError, aValues );
diff --git a/sw/source/filter/xml/xmlitemi.cxx b/sw/source/filter/xml/xmlitemi.cxx
index 2e9903170256..97d7962fcf4c 100644
--- a/sw/source/filter/xml/xmlitemi.cxx
+++ b/sw/source/filter/xml/xmlitemi.cxx
@@ -278,10 +278,10 @@ SwXMLItemSetContext_Impl::SwXMLItemSetContext_Impl(
SwXMLItemSetContext_Impl::~SwXMLItemSetContext_Impl()
{
- if( xBackground.Is() )
+ if( xBackground.is() )
{
const SvxBrushItem& rItem =
- static_cast<SwXMLBrushItemImportContext*>(&xBackground)->GetItem();
+ static_cast<SwXMLBrushItemImportContext*>(xBackground.get())->GetItem();
rItemSet.Put( rItem );
}
}
diff --git a/sw/source/filter/xml/xmltbli.cxx b/sw/source/filter/xml/xmltbli.cxx
index b8c85f312466..06878d7d79c6 100644
--- a/sw/source/filter/xml/xmltbli.cxx
+++ b/sw/source/filter/xml/xmltbli.cxx
@@ -210,7 +210,7 @@ public:
OUString const& i_rXmlId);
bool IsUsed() const { return pStartNode!=nullptr ||
- xSubTable.Is() || bProtected;}
+ xSubTable.is() || bProtected;}
sal_uInt32 GetRowSpan() const { return nRowSpan; }
void SetRowSpan( sal_uInt32 nSet ) { nRowSpan = nSet; }
@@ -281,12 +281,12 @@ inline void SwXMLTableCell_Impl::SetStartNode( const SwStartNode *pSttNd )
inline SwXMLTableContext *SwXMLTableCell_Impl::GetSubTable() const
{
- return static_cast<SwXMLTableContext *>(&xSubTable);
+ return static_cast<SwXMLTableContext *>(xSubTable.get());
}
inline void SwXMLTableCell_Impl::Dispose()
{
- if( xSubTable.Is() )
+ if( xSubTable.is() )
xSubTable = nullptr;
}
@@ -412,7 +412,7 @@ class SwXMLTableCellContext_Impl : public SvXMLImportContext
bool bHasTextContent : 1;
bool bHasTableContent : 1;
- SwXMLTableContext *GetTable() { return static_cast<SwXMLTableContext *>(&xMyTable); }
+ SwXMLTableContext *GetTable() { return static_cast<SwXMLTableContext *>(xMyTable.get()); }
bool HasContent() const { return bHasTextContent || bHasTableContent; }
inline void InsertContent_();
@@ -738,7 +738,7 @@ class SwXMLTableColContext_Impl : public SvXMLImportContext
{
SvXMLImportContextRef xMyTable;
- SwXMLTableContext *GetTable() { return static_cast<SwXMLTableContext *>(&xMyTable); }
+ SwXMLTableContext *GetTable() { return static_cast<SwXMLTableContext *>(xMyTable.get()); }
public:
@@ -823,7 +823,7 @@ class SwXMLTableColsContext_Impl : public SvXMLImportContext
{
SvXMLImportContextRef xMyTable;
- SwXMLTableContext *GetTable() { return static_cast<SwXMLTableContext *>(&xMyTable); }
+ SwXMLTableContext *GetTable() { return static_cast<SwXMLTableContext *>(xMyTable.get()); }
public:
@@ -881,7 +881,7 @@ class SwXMLTableRowContext_Impl : public SvXMLImportContext
sal_uInt32 nRowRepeat;
- SwXMLTableContext *GetTable() { return static_cast<SwXMLTableContext *>(&xMyTable); }
+ SwXMLTableContext *GetTable() { return static_cast<SwXMLTableContext *>(xMyTable.get()); }
public:
@@ -1001,7 +1001,7 @@ class SwXMLTableRowsContext_Impl : public SvXMLImportContext
bool bHeader;
- SwXMLTableContext *GetTable() { return static_cast<SwXMLTableContext *>(&xMyTable); }
+ SwXMLTableContext *GetTable() { return static_cast<SwXMLTableContext *>(xMyTable.get()); }
public:
@@ -1831,8 +1831,8 @@ SwTableBox *SwXMLTableContext::NewTableBox( const SwStartNode *pStNd,
{
// The topmost table is the only table that maintains the two members
// pBox1 and bFirstSection.
- if( m_xParentTable.Is() )
- return static_cast<SwXMLTableContext *>(&m_xParentTable)->NewTableBox( pStNd,
+ if( m_xParentTable.is() )
+ return static_cast<SwXMLTableContext *>(m_xParentTable.get())->NewTableBox( pStNd,
pUpper );
SwTableBox *pBox;
@@ -2839,8 +2839,8 @@ const SwStartNode *SwXMLTableContext::InsertTableSection(
{
// The topmost table is the only table that maintains the two members
// pBox1 and bFirstSection.
- if( m_xParentTable.Is() )
- return static_cast<SwXMLTableContext *>(&m_xParentTable)
+ if( m_xParentTable.is() )
+ return static_cast<SwXMLTableContext *>(m_xParentTable.get())
->InsertTableSection(pPrevSttNd, pStringValueStyleName);
const SwStartNode *pStNd;
@@ -2907,7 +2907,7 @@ const SwStartNode *SwXMLTableContext::InsertTableSection(
void SwXMLTableContext::EndElement()
{
- if( IsValid() && !m_xParentTable.Is() )
+ if( IsValid() && !m_xParentTable.is() )
{
MakeTable();
GetImport().GetTextImport()->SetCursor( m_xOldCursor );
diff --git a/sw/source/filter/xml/xmltbli.hxx b/sw/source/filter/xml/xmltbli.hxx
index daaea868f663..f12039777ef7 100644
--- a/sw/source/filter/xml/xmltbli.hxx
+++ b/sw/source/filter/xml/xmltbli.hxx
@@ -185,7 +185,7 @@ public:
inline SwXMLTableContext *SwXMLTableContext::GetParentTable() const
{
- return static_cast<SwXMLTableContext *>(&m_xParentTable);
+ return static_cast<SwXMLTableContext *>(m_xParentTable.get());
}
inline sal_uInt32 SwXMLTableContext::GetColumnCount() const
diff --git a/xmloff/source/core/xmlictxt.cxx b/xmloff/source/core/xmlictxt.cxx
index 2fb80c5c89a5..4a63be9db6c7 100644
--- a/xmloff/source/core/xmlictxt.cxx
+++ b/xmloff/source/core/xmlictxt.cxx
@@ -167,4 +167,19 @@ void SvXMLImportContext::onDemandRescueUsefulDataFromTemporary( const SvXMLImpor
{
}
+void SvXMLImportContext::AddFirstRef()
+{
+ acquire();
+}
+
+void SvXMLImportContext::AddNextRef()
+{
+ acquire();
+}
+
+void SvXMLImportContext::ReleaseRef()
+{
+ release();
+}
+
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmloff/source/core/xmlimp.cxx b/xmloff/source/core/xmlimp.cxx
index c9c5c8b49cdc..be0412a4c385 100644
--- a/xmloff/source/core/xmlimp.cxx
+++ b/xmloff/source/core/xmlimp.cxx
@@ -627,14 +627,14 @@ void SAL_CALL SvXMLImport::endDocument()
}
}
- if( mxFontDecls.Is() )
- static_cast<SvXMLStylesContext *>(&mxFontDecls)->Clear();
- if( mxStyles.Is() )
- static_cast<SvXMLStylesContext *>(&mxStyles)->Clear();
- if( mxAutoStyles.Is() )
- static_cast<SvXMLStylesContext *>(&mxAutoStyles)->Clear();
- if( mxMasterStyles.Is() )
- static_cast<SvXMLStylesContext *>(&mxMasterStyles)->Clear();
+ if( mxFontDecls.is() )
+ static_cast<SvXMLStylesContext *>(mxFontDecls.get())->Clear();
+ if( mxStyles.is() )
+ static_cast<SvXMLStylesContext *>(mxStyles.get())->Clear();
+ if( mxAutoStyles.is() )
+ static_cast<SvXMLStylesContext *>(mxAutoStyles.get())->Clear();
+ if( mxMasterStyles.is() )
+ static_cast<SvXMLStylesContext *>(mxMasterStyles.get())->Clear();
// possible form-layer related knittings which can only be done when
// the whole document exists
@@ -1690,32 +1690,32 @@ void SvXMLImport::SetMasterStyles( SvXMLStylesContext *pMasterStyles )
XMLFontStylesContext *SvXMLImport::GetFontDecls()
{
- return static_cast<XMLFontStylesContext *>(&mxFontDecls);
+ return static_cast<XMLFontStylesContext *>(mxFontDecls.get());
}
SvXMLStylesContext *SvXMLImport::GetStyles()
{
- return static_cast<SvXMLStylesContext *>(&mxStyles);
+ return static_cast<SvXMLStylesContext *>(mxStyles.get());
}
SvXMLStylesContext *SvXMLImport::GetAutoStyles()
{
- return static_cast<SvXMLStylesContext *>(&mxAutoStyles);
+ return static_cast<SvXMLStylesContext *>(mxAutoStyles.get());
}
const XMLFontStylesContext *SvXMLImport::GetFontDecls() const
{
- return static_cast<const XMLFontStylesContext *>(&mxFontDecls);
+ return static_cast<const XMLFontStylesContext *>(mxFontDecls.get());
}
const SvXMLStylesContext *SvXMLImport::GetStyles() const
{
- return static_cast<const SvXMLStylesContext *>(&mxStyles);
+ return static_cast<const SvXMLStylesContext *>(mxStyles.get());
}
const SvXMLStylesContext *SvXMLImport::GetAutoStyles() const
{
- return static_cast<const SvXMLStylesContext *>(&mxAutoStyles);
+ return static_cast<const SvXMLStylesContext *>(mxAutoStyles.get());
}
OUString SvXMLImport::GetAbsoluteReference(const OUString& rValue) const
@@ -1903,14 +1903,14 @@ void SvXMLImport::SetError(
void SvXMLImport::DisposingModel()
{
- if( mxFontDecls.Is() )
- static_cast<SvXMLStylesContext *>(&mxFontDecls)->Clear();
- if( mxStyles.Is() )
- static_cast<SvXMLStylesContext *>(&mxStyles)->Clear();
- if( mxAutoStyles.Is() )
- static_cast<SvXMLStylesContext *>(&mxAutoStyles)->Clear();
- if( mxMasterStyles.Is() )
- static_cast<SvXMLStylesContext *>(&mxMasterStyles)->Clear();
+ if( mxFontDecls.is() )
+ static_cast<SvXMLStylesContext *>(mxFontDecls.get())->Clear();
+ if( mxStyles.is() )
+ static_cast<SvXMLStylesContext *>(mxStyles.get())->Clear();
+ if( mxAutoStyles.is() )
+ static_cast<SvXMLStylesContext *>(mxAutoStyles.get())->Clear();
+ if( mxMasterStyles.is() )
+ static_cast<SvXMLStylesContext *>(mxMasterStyles.get())->Clear();
mxModel.set(nullptr);
mxEventListener.set(nullptr);
diff --git a/xmloff/source/core/xmlmultiimagehelper.cxx b/xmloff/source/core/xmlmultiimagehelper.cxx
index 7df84c018121..690603a6ba23 100644
--- a/xmloff/source/core/xmlmultiimagehelper.cxx
+++ b/xmloff/source/core/xmlmultiimagehelper.cxx
@@ -94,7 +94,7 @@ SvXMLImportContextRef MultiImageImportHelper::solveMultipleImages()
for(a = 0; a < maImplContextVector.size(); a++)
{
- const OUString aStreamURL(getGraphicURLFromImportContext(*maImplContextVector[a]));
+ const OUString aStreamURL(getGraphicURLFromImportContext(*maImplContextVector[a].get()));
const sal_uInt32 nNewQuality(getQualityIndex(aStreamURL));
if(nNewQuality > nBestQuality)
@@ -118,9 +118,9 @@ SvXMLImportContextRef MultiImageImportHelper::solveMultipleImages()
// remove the rest from parent
for(a = 0; a < maImplContextVector.size(); a++)
{
- SvXMLImportContext& rCandidate = *maImplContextVector[a];
+ SvXMLImportContext& rCandidate = *maImplContextVector[a].get();
- if(pContext)
+ if(pContext.is())
{
// #i124143# evtl. copy imported GluePoints before deprecating
// this graphic and context
diff --git a/xmloff/source/draw/XMLShapePropertySetContext.cxx b/xmloff/source/draw/XMLShapePropertySetContext.cxx
index 477aff269c24..ef0453f802dc 100644
--- a/xmloff/source/draw/XMLShapePropertySetContext.cxx
+++ b/xmloff/source/draw/XMLShapePropertySetContext.cxx
@@ -49,9 +49,9 @@ XMLShapePropertySetContext::~XMLShapePropertySetContext()
void XMLShapePropertySetContext::EndElement()
{
Reference< container::XIndexReplace > xNumRule;
- if( mxBulletStyle.Is() )
+ if( mxBulletStyle.is() )
{
- SvxXMLListStyleContext* pBulletStyle = static_cast<SvxXMLListStyleContext*>(&mxBulletStyle);
+ SvxXMLListStyleContext* pBulletStyle = static_cast<SvxXMLListStyleContext*>(mxBulletStyle.get());
xNumRule = SvxXMLListStyleContext::CreateNumRule( GetImport().GetModel() );
if( xNumRule.is() )
pBulletStyle->FillUnoNumRule(xNumRule);
diff --git a/xmloff/source/draw/ximpshap.cxx b/xmloff/source/draw/ximpshap.cxx
index 0d2ef7d94390..ffd707726d2a 100644
--- a/xmloff/source/draw/ximpshap.cxx
+++ b/xmloff/source/draw/ximpshap.cxx
@@ -3493,7 +3493,7 @@ SvXMLImportContext *SdXMLFrameShapeContext::CreateChildContext( sal_uInt16 nPref
{
SvXMLImportContext * pContext = nullptr;
- if( !mxImplContext.Is() )
+ if( !mxImplContext.is() )
{
SvXMLShapeContext* pShapeContext= GetImport().GetShapeImport()->CreateFrameChildContext(
GetImport(), nPrefix, rLocalName, xAttrList, mxShapes, mxAttrList );
@@ -3523,7 +3523,7 @@ SvXMLImportContext *SdXMLFrameShapeContext::CreateChildContext( sal_uInt16 nPref
if(getSupportsMultipleContents() && dynamic_cast< SdXMLGraphicObjectShapeContext* >(pContext))
{
- addContent(*mxImplContext);
+ addContent(*mxImplContext.get());
}
}
else if(getSupportsMultipleContents() && XML_NAMESPACE_DRAW == nPrefix && IsXMLToken(rLocalName, XML_IMAGE))
@@ -3535,15 +3535,15 @@ SvXMLImportContext *SdXMLFrameShapeContext::CreateChildContext( sal_uInt16 nPref
if(dynamic_cast< SdXMLGraphicObjectShapeContext* >(pContext))
{
- addContent(*mxImplContext);
+ addContent(*mxImplContext.get());
}
}
- else if( mbSupportsReplacement && !mxReplImplContext &&
+ else if( mbSupportsReplacement && !mxReplImplContext.is() &&
XML_NAMESPACE_DRAW == nPrefix &&
IsXMLToken( rLocalName, XML_IMAGE ) )
{
// read replacement image
- SvXMLImportContext *pImplContext = &mxImplContext;
+ SvXMLImportContext *pImplContext = mxImplContext.get();
SdXMLShapeContext *pSContext =
dynamic_cast<SdXMLShapeContext*>( pImplContext );
if( pSContext )
@@ -3565,13 +3565,13 @@ SvXMLImportContext *SdXMLFrameShapeContext::CreateChildContext( sal_uInt16 nPref
(nPrefix == XML_NAMESPACE_DRAW && (IsXMLToken( rLocalName, XML_GLUE_POINT ) ||
IsXMLToken( rLocalName, XML_THUMBNAIL ) ) ) )
{
- SvXMLImportContext *pImplContext = &mxImplContext;
+ SvXMLImportContext *pImplContext = mxImplContext.get();
pContext = dynamic_cast<SdXMLShapeContext&>(*pImplContext).CreateChildContext( nPrefix,
rLocalName, xAttrList );
}
else if ( (XML_NAMESPACE_DRAW == nPrefix) && IsXMLToken( rLocalName, XML_IMAGE_MAP ) )
{
- SdXMLShapeContext *pSContext = dynamic_cast< SdXMLShapeContext* >( &mxImplContext );
+ SdXMLShapeContext *pSContext = dynamic_cast< SdXMLShapeContext* >( mxImplContext.get() );
if( pSContext )
{
uno::Reference < beans::XPropertySet > xPropSet( pSContext->getShape(), uno::UNO_QUERY );
@@ -3598,17 +3598,17 @@ void SdXMLFrameShapeContext::EndElement()
// solve if multiple image child contexts were imported
SvXMLImportContextRef const pSelectedContext(solveMultipleImages());
const SdXMLGraphicObjectShapeContext* pShapeContext(
- dynamic_cast<const SdXMLGraphicObjectShapeContext*>(&pSelectedContext));
+ dynamic_cast<const SdXMLGraphicObjectShapeContext*>(pSelectedContext.get()));
if ( pShapeContext && !maShapeId.isEmpty() )
{
// fdo#64512 and fdo#60075 - make sure *this* shape is
// registered for given ID
- assert( mxImplContext.Is() );
+ assert( mxImplContext.is() );
const uno::Reference< uno::XInterface > xShape( pShapeContext->getShape() );
GetImport().getInterfaceToIdentifierMapper().registerReferenceAlways( maShapeId, xShape );
}
- if( !mxImplContext.Is() )
+ if( !mxImplContext.is() )
{
// now check if this is an empty presentation object
sal_Int16 nAttrCount = mxAttrList.is() ? mxAttrList->getLength() : 0;
@@ -3655,7 +3655,7 @@ void SdXMLFrameShapeContext::EndElement()
mxImplContext = GetImport().GetShapeImport()->CreateFrameChildContext(
GetImport(), XML_NAMESPACE_DRAW, GetXMLToken( eToken ), mxAttrList, mxShapes, xEmpty );
- if( mxImplContext.Is() )
+ if( mxImplContext.is() )
{
mxImplContext->StartElement( mxAttrList );
mxImplContext->EndElement();
@@ -4014,7 +4014,7 @@ void SdXMLTableShapeContext::StartElement( const css::uno::Reference< css::xml::
if( xColumnRowRange.is() )
mxTableImportContext = xTableImport->CreateTableContext( GetPrefix(), GetLocalName(), xColumnRowRange );
- if( mxTableImportContext.Is() )
+ if( mxTableImportContext.is() )
mxTableImportContext->StartElement( xAttrList );
}
}
@@ -4022,7 +4022,7 @@ void SdXMLTableShapeContext::StartElement( const css::uno::Reference< css::xml::
void SdXMLTableShapeContext::EndElement()
{
- if( mxTableImportContext.Is() )
+ if( mxTableImportContext.is() )
mxTableImportContext->EndElement();
SdXMLShapeContext::EndElement();
@@ -4065,7 +4065,7 @@ void SdXMLTableShapeContext::processAttribute( sal_uInt16 nPrefix, const OUStrin
SvXMLImportContext* SdXMLTableShapeContext::CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const uno::Reference<xml::sax::XAttributeList>& xAttrList )
{
- if( mxTableImportContext.Is() && (nPrefix == XML_NAMESPACE_TABLE) )
+ if( mxTableImportContext.is() && (nPrefix == XML_NAMESPACE_TABLE) )
return mxTableImportContext->CreateChildContext(nPrefix, rLocalName, xAttrList);
else
return SdXMLShapeContext::CreateChildContext(nPrefix, rLocalName, xAttrList);
diff --git a/xmloff/source/style/XMLFontStylesContext_impl.hxx b/xmloff/source/style/XMLFontStylesContext_impl.hxx
index 35c2aa4cdb1c..a96cc47eba96 100644
--- a/xmloff/source/style/XMLFontStylesContext_impl.hxx
+++ b/xmloff/source/style/XMLFontStylesContext_impl.hxx
@@ -39,7 +39,7 @@ class XMLFontStyleContextFontFace : public SvXMLStyleContext
XMLFontStylesContext *GetStyles()
{
- return static_cast<XMLFontStylesContext *>(&xStyles);
+ return static_cast<XMLFontStylesContext *>(xStyles.get());
}
public:
diff --git a/xmloff/source/style/prstylei.cxx b/xmloff/source/style/prstylei.cxx
index 5900230ad889..2b34eec7eddd 100644
--- a/xmloff/source/style/prstylei.cxx
+++ b/xmloff/source/style/prstylei.cxx
@@ -62,7 +62,7 @@ void XMLPropStyleContext::SetAttribute( sal_uInt16 nPrefixKey,
{
if( XML_NAMESPACE_STYLE == nPrefixKey && IsXMLToken( rLocalName, XML_FAMILY ) )
{
- SAL_WARN_IF( GetFamily() != static_cast<SvXMLStylesContext *>(&mxStyles)->GetFamily( rValue ), "xmloff", "unexpected style family" );
+ SAL_WARN_IF( GetFamily() != static_cast<SvXMLStylesContext *>(mxStyles.get())->GetFamily( rValue ), "xmloff", "unexpected style family" );
}
else
{
@@ -218,7 +218,7 @@ SvXMLImportContext *XMLPropStyleContext::CreateChildContext(
if( nFamily )
{
rtl::Reference < SvXMLImportPropertyMapper > xImpPrMap =
- static_cast<SvXMLStylesContext *>(&mxStyles)->GetImportPropertyMapper(
+ static_cast<SvXMLStylesContext *>(mxStyles.get())->GetImportPropertyMapper(
GetFamily() );
if( xImpPrMap.is() )
pContext = new SvXMLPropertySetContext( GetImport(), nPrefix,
@@ -239,7 +239,7 @@ void XMLPropStyleContext::FillPropertySet(
const Reference< XPropertySet > & rPropSet )
{
rtl::Reference < SvXMLImportPropertyMapper > xImpPrMap =
- static_cast<SvXMLStylesContext *>(&mxStyles)->GetImportPropertyMapper(
+ static_cast<SvXMLStylesContext *>(mxStyles.get())->GetImportPropertyMapper(
GetFamily() );
SAL_WARN_IF( !xImpPrMap.is(), "xmloff", "There is the import prop mapper" );
if( xImpPrMap.is() )
@@ -255,7 +255,7 @@ Reference < XStyle > XMLPropStyleContext::Create()
Reference < XStyle > xNewStyle;
OUString sServiceName(
- static_cast<SvXMLStylesContext *>(&mxStyles)->GetServiceName( GetFamily() ) );
+ static_cast<SvXMLStylesContext *>(mxStyles.get())->GetServiceName( GetFamily() ) );
if( !sServiceName.isEmpty() )
{
Reference< XMultiServiceFactory > xFactory( GetImport().GetModel(),
@@ -274,7 +274,7 @@ Reference < XStyle > XMLPropStyleContext::Create()
void XMLPropStyleContext::CreateAndInsert( bool bOverwrite )
{
- SvXMLStylesContext* pSvXMLStylesContext = static_cast< SvXMLStylesContext* >(&mxStyles);
+ SvXMLStylesContext* pSvXMLStylesContext = static_cast< SvXMLStylesContext* >(mxStyles.get());
rtl::Reference < SvXMLImportPropertyMapper > xImpPrMap = pSvXMLStylesContext->GetImportPropertyMapper(GetFamily());
OSL_ENSURE(xImpPrMap.is(), "There is no import prop mapper");
@@ -464,7 +464,7 @@ void XMLPropStyleContext::Finish( bool bOverwrite )
{
// The families container must exist
Reference < XNameContainer > xFamilies =
- static_cast<SvXMLStylesContext *>(&mxStyles)->GetStylesContainer( GetFamily() );
+ static_cast<SvXMLStylesContext *>(mxStyles.get())->GetStylesContainer( GetFamily() );
SAL_WARN_IF( !xFamilies.is(), "xmloff", "Families lost" );
if( !xFamilies.is() )
return;
diff --git a/xmloff/source/table/XMLTableImport.cxx b/xmloff/source/table/XMLTableImport.cxx
index 6ac15996f9d0..2879196a4771 100644
--- a/xmloff/source/table/XMLTableImport.cxx
+++ b/xmloff/source/table/XMLTableImport.cxx
@@ -178,7 +178,7 @@ XMLProxyContext::XMLProxyContext( SvXMLImport& rImport, const SvXMLImportContext
SvXMLImportContext * XMLProxyContext::CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const Reference< XAttributeList >& xAttrList )
{
- if( mxParent.Is() )
+ if( mxParent.is() )
return mxParent->CreateChildContext( nPrefix, rLocalName, xAttrList );
else
return SvXMLImportContext::CreateChildContext( nPrefix, rLocalName, xAttrList );
diff --git a/xmloff/source/text/XMLIndexTOCContext.cxx b/xmloff/source/text/XMLIndexTOCContext.cxx
index 78d682dcf660..d7bd6c21c546 100644
--- a/xmloff/source/text/XMLIndexTOCContext.cxx
+++ b/xmloff/source/text/XMLIndexTOCContext.cxx
@@ -260,8 +260,8 @@ void XMLIndexTOCContext::EndElement()
// get rid of last paragraph (unless it's the only paragraph)
rHelper->GetCursor()->goRight(1, false);
- if( xBodyContextRef.Is() &&
- static_cast<XMLIndexBodyContext*>(&xBodyContextRef)->HasContent() )
+ if( xBodyContextRef.is() &&
+ static_cast<XMLIndexBodyContext*>(xBodyContextRef.get())->HasContent() )
{
rHelper->GetCursor()->goLeft(1, true);
rHelper->GetText()->insertString(rHelper->GetCursorAsRange(),
@@ -293,8 +293,8 @@ SvXMLImportContext* XMLIndexTOCContext::CreateChildContext(
{
pContext = new XMLIndexBodyContext(GetImport(), nPrefix,
rLocalName);
- if ( !xBodyContextRef.Is() ||
- !static_cast<XMLIndexBodyContext*>(&xBodyContextRef)->HasContent() )
+ if ( !xBodyContextRef.is() ||
+ !static_cast<XMLIndexBodyContext*>(xBodyContextRef.get())->HasContent() )
{
xBodyContextRef = pContext;
}
diff --git a/xmloff/source/text/XMLTextFrameContext.cxx b/xmloff/source/text/XMLTextFrameContext.cxx
index c304bfb74526..bb6ae183b45e 100644
--- a/xmloff/source/text/XMLTextFrameContext.cxx
+++ b/xmloff/source/text/XMLTextFrameContext.cxx
@@ -1322,7 +1322,7 @@ void XMLTextFrameContext_Impl::SetDesc( const OUString& rDesc )
bool XMLTextFrameContext::CreateIfNotThere( css::uno::Reference < css::beans::XPropertySet >& rPropSet )
{
- SvXMLImportContext *pContext = &m_xImplContext;
+ SvXMLImportContext *pContext = m_xImplContext.get();
XMLTextFrameContext_Impl *pImpl = dynamic_cast< XMLTextFrameContext_Impl*>( pContext );
if( pImpl )
{
@@ -1402,16 +1402,16 @@ void XMLTextFrameContext::EndElement()
SvXMLImportContextRef const pMultiContext(solveMultipleImages());
SvXMLImportContext const*const pContext =
- (pMultiContext) ? &pMultiContext : &m_xImplContext;
+ (pMultiContext.is()) ? pMultiContext.get() : m_xImplContext.get();
XMLTextFrameContext_Impl *pImpl = const_cast<XMLTextFrameContext_Impl*>(dynamic_cast< const XMLTextFrameContext_Impl*>( pContext ));
- assert(!pMultiContext || pImpl);
+ assert(!pMultiContext.is() || pImpl);
if( pImpl )
{
pImpl->CreateIfNotThere();
// fdo#68839: in case the surviving image was not the first one,
// it will have a counter added to its name - set the original name
- if (pMultiContext) // do this only when necessary; esp. not for text
+ if (pMultiContext.is()) // do this only when necessary; esp. not for text
{ // frames that may have entries in GetRenameMap()!
pImpl->SetName();
}
@@ -1443,7 +1443,7 @@ SvXMLImportContext *XMLTextFrameContext::CreateChildContext(
{
SvXMLImportContext *pContext = nullptr;
- if( !m_xImplContext.Is() )
+ if( !m_xImplContext.is() )
{
// no child exists
if( XML_NAMESPACE_DRAW == p_nPrefix )
@@ -1526,7 +1526,7 @@ SvXMLImportContext *XMLTextFrameContext::CreateChildContext(
if(getSupportsMultipleContents() && XML_TEXT_FRAME_GRAPHIC == nFrameType)
{
- addContent(*m_xImplContext);
+ addContent(*m_xImplContext.get());
}
}
}
@@ -1539,9 +1539,9 @@ SvXMLImportContext *XMLTextFrameContext::CreateChildContext(
m_eDefaultAnchorType, XML_TEXT_FRAME_GRAPHIC, m_xAttrList);
m_xImplContext = pContext;
- addContent(*m_xImplContext);
+ addContent(*m_xImplContext.get());
}
- else if( m_bSupportsReplacement && !m_xReplImplContext &&
+ else if( m_bSupportsReplacement && !m_xReplImplContext.is() &&
XML_NAMESPACE_DRAW == p_nPrefix &&
IsXMLToken( rLocalName, XML_IMAGE ) )
{
@@ -1636,7 +1636,7 @@ SvXMLImportContext *XMLTextFrameContext::CreateChildContext(
{
// the child is a drawing shape
pContext = XMLShapeImportHelper::CreateFrameChildContext(
- &m_xImplContext, p_nPrefix, rLocalName, xAttrList );
+ m_xImplContext.get(), p_nPrefix, rLocalName, xAttrList );
}
if( !pContext )
@@ -1658,7 +1658,7 @@ void XMLTextFrameContext::SetHyperlink( const OUString& rHRef,
TextContentAnchorType XMLTextFrameContext::GetAnchorType() const
{
- SvXMLImportContext *pContext = &m_xImplContext;
+ SvXMLImportContext *pContext = m_xImplContext.get();
XMLTextFrameContext_Impl *pImpl = dynamic_cast< XMLTextFrameContext_Impl*>( pContext );
if( pImpl )
return pImpl->GetAnchorType();
@@ -1669,7 +1669,7 @@ TextContentAnchorType XMLTextFrameContext::GetAnchorType() const
Reference < XTextContent > XMLTextFrameContext::GetTextContent() const
{
Reference < XTextContent > xTxtCntnt;
- SvXMLImportContext *pContext = &m_xImplContext;
+ SvXMLImportContext *pContext = m_xImplContext.get();
XMLTextFrameContext_Impl *pImpl = dynamic_cast< XMLTextFrameContext_Impl* >( pContext );
if( pImpl )
xTxtCntnt.set( pImpl->GetPropSet(), UNO_QUERY );
@@ -1680,7 +1680,7 @@ Reference < XTextContent > XMLTextFrameContext::GetTextContent() const
Reference < XShape > XMLTextFrameContext::GetShape() const
{
Reference < XShape > xShape;
- SvXMLImportContext* pContext = &m_xImplContext;
+ SvXMLImportContext* pContext = m_xImplContext.get();
SvXMLShapeContext* pImpl = dynamic_cast<SvXMLShapeContext*>( pContext );
if ( pImpl )
{
diff --git a/xmloff/source/text/XMLTextFrameHyperlinkContext.cxx b/xmloff/source/text/XMLTextFrameHyperlinkContext.cxx
index 6b5fcd24537f..469d1b58776b 100644
--- a/xmloff/source/text/XMLTextFrameHyperlinkContext.cxx
+++ b/xmloff/source/text/XMLTextFrameHyperlinkContext.cxx
@@ -134,9 +134,9 @@ SvXMLImportContext *XMLTextFrameHyperlinkContext::CreateChildContext(
TextContentAnchorType XMLTextFrameHyperlinkContext::GetAnchorType() const
{
- if( xFrameContext.Is() )
+ if( xFrameContext.is() )
{
- SvXMLImportContext *pContext = &xFrameContext;
+ SvXMLImportContext *pContext = xFrameContext.get();
return dynamic_cast<XMLTextFrameContext&>(*pContext).GetAnchorType();
}
else
@@ -147,9 +147,9 @@ TextContentAnchorType XMLTextFrameHyperlinkContext::GetAnchorType() const
Reference < XTextContent > XMLTextFrameHyperlinkContext::GetTextContent() const
{
Reference <XTextContent > xTxt;
- if( xFrameContext.Is() )
+ if( xFrameContext.is() )
{
- SvXMLImportContext *pContext = &xFrameContext;
+ SvXMLImportContext *pContext = xFrameContext.get();
xTxt = dynamic_cast<XMLTextFrameContext&>(*pContext).GetTextContent();
}
@@ -160,9 +160,9 @@ Reference < XTextContent > XMLTextFrameHyperlinkContext::GetTextContent() const
Reference < drawing::XShape > XMLTextFrameHyperlinkContext::GetShape() const
{
Reference < drawing::XShape > xShape;
- if( xFrameContext.Is() )
+ if( xFrameContext.is() )
{
- SvXMLImportContext *pContext = &xFrameContext;
+ SvXMLImportContext *pContext = xFrameContext.get();
xShape = dynamic_cast<XMLTextFrameContext&>(*pContext).GetShape();
}
diff --git a/xmloff/source/text/XMLTextListBlockContext.cxx b/xmloff/source/text/XMLTextListBlockContext.cxx
index 757676d62b1a..1637cf39bab4 100644
--- a/xmloff/source/text/XMLTextListBlockContext.cxx
+++ b/xmloff/source/text/XMLTextListBlockContext.cxx
@@ -71,10 +71,10 @@ XMLTextListBlockContext::XMLTextListBlockContext(
// Inherit style name from parent list, as well as the flags whether
// numbering must be restarted and formats have to be created.
OUString sParentListStyleName;
- if( mxParentListBlock.Is() )
+ if( mxParentListBlock.is() )
{
XMLTextListBlockContext *pParent =
- static_cast<XMLTextListBlockContext *>(&mxParentListBlock);
+ static_cast<XMLTextListBlockContext *>(mxParentListBlock.get());
msListStyleName = pParent->GetListStyleName();
sParentListStyleName = msListStyleName;
mxNumRules = pParent->GetNumRules();
@@ -239,7 +239,7 @@ void XMLTextListBlockContext::EndElement()
// Numbering has not to be restarted if it has been restarted within
// a child list.
XMLTextListBlockContext *pParent =
- static_cast<XMLTextListBlockContext *>(&mxParentListBlock);
+ static_cast<XMLTextListBlockContext *>(mxParentListBlock.get());
if( pParent )
{
pParent->mbRestartNumbering = mbRestartNumbering;
diff --git a/xmloff/source/text/XMLTextShapeStyleContext.cxx b/xmloff/source/text/XMLTextShapeStyleContext.cxx
index 77cdcf096a79..6ad954645c5e 100644
--- a/xmloff/source/text/XMLTextShapeStyleContext.cxx
+++ b/xmloff/source/text/XMLTextShapeStyleContext.cxx
@@ -217,11 +217,11 @@ void XMLTextShapeStyleContext::CreateAndInsert( bool bOverwrite )
}
// tell the style about it's events (if applicable)
- if( xEventContext.Is() )
+ if( xEventContext.is() )
{
// set event suppplier and release reference to context
Reference<XEventsSupplier> xEventsSupplier(xStyle, UNO_QUERY);
- static_cast<XMLEventsImportContext *>(&xEventContext)->SetEvents(xEventsSupplier);
+ static_cast<XMLEventsImportContext *>(xEventContext.get())->SetEvents(xEventsSupplier);
xEventContext = nullptr;
}
}
diff --git a/xmloff/source/text/txtfldi.cxx b/xmloff/source/text/txtfldi.cxx
index 0bc857a3db83..1a81f82c9db7 100644
--- a/xmloff/source/text/txtfldi.cxx
+++ b/xmloff/source/text/txtfldi.cxx
@@ -2563,11 +2563,11 @@ void XMLMacroFieldImportContext::PrepareField(
OUString sLibraryName;
OUString sScriptURL;
- if ( xEventContext.Is() )
+ if ( xEventContext.is() )
{
// get event sequence
XMLEventsImportContext* pEvents =
- static_cast<XMLEventsImportContext*>(&xEventContext);
+ static_cast<XMLEventsImportContext*>(xEventContext.get());
Sequence<PropertyValue> aValues;
pEvents->GetEventSequence( sOnClick, aValues );
diff --git a/xmloff/source/text/txtimp.cxx b/xmloff/source/text/txtimp.cxx
index 4b156811ab95..093236a95b02 100644
--- a/xmloff/source/text/txtimp.cxx
+++ b/xmloff/source/text/txtimp.cxx
@@ -1229,10 +1229,10 @@ OUString XMLTextImportHelper::ConvertStarFonts( const OUString& rChars,
XMLTextStyleContext *pStyle = nullptr;
sal_uInt16 nFamily = bPara ? XML_STYLE_FAMILY_TEXT_PARAGRAPH
: XML_STYLE_FAMILY_TEXT_TEXT;
- if (!rStyleName.isEmpty() && m_xImpl->m_xAutoStyles.Is())
+ if (!rStyleName.isEmpty() && m_xImpl->m_xAutoStyles.is())
{
const SvXMLStyleContext* pTempStyle =
- static_cast<SvXMLStylesContext *>(&m_xImpl->m_xAutoStyles)->
+ static_cast<SvXMLStylesContext *>(m_xImpl->m_xAutoStyles.get())->
FindStyleChildContext( nFamily, rStyleName,
true );
pStyle = const_cast<XMLTextStyleContext*>( dynamic_cast< const XMLTextStyleContext* >(pTempStyle));
@@ -1244,7 +1244,7 @@ OUString XMLTextImportHelper::ConvertStarFonts( const OUString& rChars,
if( nCount )
{
rtl::Reference < SvXMLImportPropertyMapper > xImpPrMap =
- static_cast<SvXMLStylesContext *>(&m_xImpl->m_xAutoStyles)
+ static_cast<SvXMLStylesContext *>(m_xImpl->m_xAutoStyles.get())
->GetImportPropertyMapper(nFamily);
if( xImpPrMap.is() )
{
@@ -1444,10 +1444,10 @@ OUString XMLTextImportHelper::SetStyleAndAttrs(
: XML_STYLE_FAMILY_TEXT_TEXT;
XMLTextStyleContext *pStyle = nullptr;
OUString sStyleName( rStyleName );
- if (!sStyleName.isEmpty() && m_xImpl->m_xAutoStyles.Is())
+ if (!sStyleName.isEmpty() && m_xImpl->m_xAutoStyles.is())
{
const SvXMLStyleContext* pTempStyle =
- static_cast<SvXMLStylesContext *>(&m_xImpl->m_xAutoStyles)->
+ static_cast<SvXMLStylesContext *>(m_xImpl->m_xAutoStyles.get())->
FindStyleChildContext( nFamily, sStyleName, true );
pStyle = const_cast<XMLTextStyleContext*>(dynamic_cast< const XMLTextStyleContext* >(pTempStyle));
}
@@ -2130,10 +2130,10 @@ void XMLTextImportHelper::SetRuby(
xPropSet->setPropertyValue(sRubyText, makeAny(rText));
// the ruby style (ruby-adjust)
- if (!rStyleName.isEmpty() && m_xImpl->m_xAutoStyles.Is())
+ if (!rStyleName.isEmpty() && m_xImpl->m_xAutoStyles.is())
{
const SvXMLStyleContext* pTempStyle =
- static_cast<SvXMLStylesContext *>(&m_xImpl->m_xAutoStyles)->
+ static_cast<SvXMLStylesContext *>(m_xImpl->m_xAutoStyles.get())->
FindStyleChildContext( XML_STYLE_FAMILY_TEXT_RUBY,
rStyleName, true );
XMLPropStyleContext *pStyle = const_cast<XMLPropStyleContext*>(dynamic_cast< const XMLPropStyleContext* >(pTempStyle));
@@ -2368,7 +2368,7 @@ sal_Int32 XMLTextImportHelper::GetDataStyleKey(const OUString& sStyleName,
bool* pIsSystemLanguage )
{
const SvXMLStyleContext* pStyle =
- static_cast<SvXMLStylesContext *>(&m_xImpl->m_xAutoStyles)->
+ static_cast<SvXMLStylesContext *>(m_xImpl->m_xAutoStyles.get())->
FindStyleChildContext( XML_STYLE_FAMILY_DATA_STYLE,
sStyleName, true );
@@ -2401,10 +2401,10 @@ sal_Int32 XMLTextImportHelper::GetDataStyleKey(const OUString& sStyleName,
const SvxXMLListStyleContext *XMLTextImportHelper::FindAutoListStyle( const OUString& rName ) const
{
const SvxXMLListStyleContext *pStyle = nullptr;
- if (m_xImpl->m_xAutoStyles.Is())
+ if (m_xImpl->m_xAutoStyles.is())
{
const SvXMLStyleContext* pTempStyle =
- static_cast<SvXMLStylesContext *>(&m_xImpl->m_xAutoStyles)->
+ static_cast<SvXMLStylesContext *>(m_xImpl->m_xAutoStyles.get())->
FindStyleChildContext( XML_STYLE_FAMILY_TEXT_LIST, rName,
true );
pStyle = dynamic_cast< const SvxXMLListStyleContext* >(pTempStyle);
@@ -2416,10 +2416,10 @@ const SvxXMLListStyleContext *XMLTextImportHelper::FindAutoListStyle( const OUSt
XMLPropStyleContext *XMLTextImportHelper::FindAutoFrameStyle( const OUString& rName ) const
{
XMLPropStyleContext *pStyle = nullptr;
- if (m_xImpl->m_xAutoStyles.Is())
+ if (m_xImpl->m_xAutoStyles.is())
{
const SvXMLStyleContext* pTempStyle =
- static_cast<SvXMLStylesContext *>(&m_xImpl->m_xAutoStyles)->
+ static_cast<SvXMLStylesContext *>(m_xImpl->m_xAutoStyles.get())->
FindStyleChildContext( XML_STYLE_FAMILY_SD_GRAPHICS_ID, rName,
true );
pStyle = const_cast<XMLPropStyleContext*>(dynamic_cast< const XMLPropStyleContext* >(pTempStyle));
@@ -2432,10 +2432,10 @@ XMLPropStyleContext* XMLTextImportHelper::FindSectionStyle(
const OUString& rName ) const
{
XMLPropStyleContext* pStyle = nullptr;
- if (m_xImpl->m_xAutoStyles.Is())
+ if (m_xImpl->m_xAutoStyles.is())
{
const SvXMLStyleContext* pTempStyle =
- static_cast<SvXMLStylesContext *>(&m_xImpl->m_xAutoStyles)->
+ static_cast<SvXMLStylesContext *>(m_xImpl->m_xAutoStyles.get())->
FindStyleChildContext(
XML_STYLE_FAMILY_TEXT_SECTION,
rName, true );
@@ -2449,10 +2449,10 @@ XMLPropStyleContext* XMLTextImportHelper::FindPageMaster(
const OUString& rName ) const
{
XMLPropStyleContext* pStyle = nullptr;
- if (m_xImpl->m_xAutoStyles.Is())
+ if (m_xImpl->m_xAutoStyles.is())
{
const SvXMLStyleContext* pTempStyle =
- static_cast<SvXMLStylesContext *>(&m_xImpl->m_xAutoStyles)->
+ static_cast<SvXMLStylesContext *>(m_xImpl->m_xAutoStyles.get())->
FindStyleChildContext(
XML_STYLE_FAMILY_PAGE_MASTER,
rName, true );
diff --git a/xmloff/source/text/txtlists.cxx b/xmloff/source/text/txtlists.cxx
index 09c62c7f742c..da1a1bc2b3d1 100644
--- a/xmloff/source/text/txtlists.cxx
+++ b/xmloff/source/text/txtlists.cxx
@@ -103,11 +103,11 @@ void XMLTextListsHelper::ListContextTop(
{
if ( !mListStack.empty() ) {
o_pListBlockContext =
- static_cast<XMLTextListBlockContext*>(&std::get<0>(mListStack.top()));
+ static_cast<XMLTextListBlockContext*>(std::get<0>(mListStack.top()).get());
o_pListItemContext =
- static_cast<XMLTextListItemContext *>(&std::get<1>(mListStack.top()));
+ static_cast<XMLTextListItemContext *>(std::get<1>(mListStack.top()).get());
o_pNumberedParagraphContext =
- static_cast<XMLNumberedParaContext *>(&std::get<2>(mListStack.top()));
+ static_cast<XMLNumberedParaContext *>(std::get<2>(mListStack.top()).get());
}
}
@@ -116,9 +116,9 @@ void XMLTextListsHelper::SetListItem( XMLTextListItemContext *i_pListItem )
// may be cleared by ListBlockContext for upper list...
if (i_pListItem) {
assert(mListStack.size());
- assert(std::get<0>(mListStack.top()) &&
+ assert(std::get<0>(mListStack.top()).is() &&
"internal error: SetListItem: mListStack has no ListBlock");
- assert(!std::get<1>(mListStack.top()) &&
+ assert(!std::get<1>(mListStack.top()).is() &&
"error: SetListItem: list item already exists");
}
if ( !mListStack.empty() ) {
diff --git a/xmloff/source/text/txtparaimphint.hxx b/xmloff/source/text/txtparaimphint.hxx
index e8308b1470e3..84da197cde13 100644
--- a/xmloff/source/text/txtparaimphint.hxx
+++ b/xmloff/source/text/txtparaimphint.hxx
@@ -197,7 +197,7 @@ public:
css::uno::Reference < css::text::XTextContent > GetTextContent() const
{
css::uno::Reference < css::text::XTextContent > xTxt;
- SvXMLImportContext *pContext = &xContext;
+ SvXMLImportContext *pContext = xContext.get();
if (XMLTextFrameContext *pFrameContext = dynamic_cast<XMLTextFrameContext*>(pContext))
xTxt = pFrameContext->GetTextContent();
else if (XMLTextFrameHyperlinkContext *pLinkContext = dynamic_cast<XMLTextFrameHyperlinkContext*>(pContext))
@@ -210,7 +210,7 @@ public:
css::uno::Reference < css::drawing::XShape > GetShape() const
{
css::uno::Reference < css::drawing::XShape > xShape;
- SvXMLImportContext *pContext = &xContext;
+ SvXMLImportContext *pContext = xContext.get();
if (XMLTextFrameContext *pFrameContext = dynamic_cast<XMLTextFrameContext*>(pContext))
xShape = pFrameContext->GetShape();
else if(XMLTextFrameHyperlinkContext *pLinkContext = dynamic_cast<XMLTextFrameHyperlinkContext*>(pContext))
@@ -222,7 +222,7 @@ public:
bool IsBoundAtChar() const
{
bool bRet = false;
- SvXMLImportContext *pContext = &xContext;
+ SvXMLImportContext *pContext = xContext.get();
if (XMLTextFrameContext *pFrameContext = dynamic_cast<XMLTextFrameContext*>(pContext))
bRet = css::text::TextContentAnchorType_AT_CHARACTER ==
pFrameContext->GetAnchorType();
@@ -254,7 +254,7 @@ public:
// Frame "to character": anchor moves from first to last char after saving (#i33242#)
css::uno::Reference < css::drawing::XShape > GetShape() const
{
- return static_cast<SvXMLShapeContext*>(&xContext)->getShape();
+ return static_cast<SvXMLShapeContext*>(xContext.get())->getShape();
}
};
#endif