sw: prefix members of SwNode2LayImpl, SwRetrievedInputStreamDataManager, ...

... SwXDrawPage and SwXShape

See tdf#94879 for motivation.

Change-Id: I0cfdc1a1b7e1667dccf8db29616b895a76b8fea5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100843
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins
This commit is contained in:
Miklos Vajna
2020-08-17 09:01:39 +02:00
parent bb4ebb8bd1
commit 3297c44c14
5 changed files with 184 additions and 184 deletions

View File

@@ -80,9 +80,9 @@ typedef cppu::WeakAggImplHelper4
SwXDrawPageBaseClass; SwXDrawPageBaseClass;
class SwXDrawPage final : public SwXDrawPageBaseClass class SwXDrawPage final : public SwXDrawPageBaseClass
{ {
SwDoc* pDoc; SwDoc* m_pDoc;
css::uno::Reference< css::uno::XAggregation > xPageAgg; css::uno::Reference< css::uno::XAggregation > m_xPageAgg;
SwFmDrawPage* pDrawPage; SwFmDrawPage* m_pDrawPage;
public: public:
SwXDrawPage(SwDoc* pDoc); SwXDrawPage(SwDoc* pDoc);
virtual ~SwXDrawPage() override; virtual ~SwXDrawPage() override;
@@ -139,7 +139,7 @@ class SwXShape : public SwXShapeBaseClass, public SvtListener
const SwFmDrawPage* m_pPage; const SwFmDrawPage* m_pPage;
SwFrameFormat* m_pFormat; SwFrameFormat* m_pFormat;
css::uno::Reference< css::uno::XAggregation > xShapeAgg; css::uno::Reference< css::uno::XAggregation > m_xShapeAgg;
// reference to <XShape>, determined in the // reference to <XShape>, determined in the
// constructor by <queryAggregation> at <xShapeAgg>. // constructor by <queryAggregation> at <xShapeAgg>.
css::uno::Reference< css::drawing::XShape > mxShape; css::uno::Reference< css::drawing::XShape > mxShape;
@@ -147,7 +147,7 @@ class SwXShape : public SwXShapeBaseClass, public SvtListener
const SfxItemPropertySet* m_pPropSet; const SfxItemPropertySet* m_pPropSet;
const SfxItemPropertyMapEntry* m_pPropertyMapEntries; const SfxItemPropertyMapEntry* m_pPropertyMapEntries;
std::unique_ptr<SwShapeDescriptor_Impl> pImpl; std::unique_ptr<SwShapeDescriptor_Impl> m_pImpl;
bool m_bDescriptor; bool m_bDescriptor;
@@ -255,9 +255,9 @@ public:
virtual void SAL_CALL setSize( const css::awt::Size& aSize ) override; virtual void SAL_CALL setSize( const css::awt::Size& aSize ) override;
virtual OUString SAL_CALL getShapeType( ) override; virtual OUString SAL_CALL getShapeType( ) override;
SwShapeDescriptor_Impl* GetDescImpl() {return pImpl.get();} SwShapeDescriptor_Impl* GetDescImpl() {return m_pImpl.get();}
SwFrameFormat* GetFrameFormat() const { return m_pFormat; } SwFrameFormat* GetFrameFormat() const { return m_pFormat; }
const css::uno::Reference< css::uno::XAggregation >& GetAggregationInterface() const {return xShapeAgg;} const css::uno::Reference< css::uno::XAggregation >& GetAggregationInterface() const {return m_xShapeAgg;}
// helper // helper
static void AddExistingShapeToFormat( SdrObject const & _rObj ); static void AddExistingShapeToFormat( SdrObject const & _rObj );

View File

@@ -35,12 +35,12 @@
*/ */
class SwNode2LayImpl class SwNode2LayImpl
{ {
std::unique_ptr<SwIterator<SwFrame, SwModify, sw::IteratorMode::UnwrapMulti>> pIter; std::unique_ptr<SwIterator<SwFrame, SwModify, sw::IteratorMode::UnwrapMulti>> mpIter;
SwModify* pMod; SwModify* mpMod;
std::vector<SwFrame*> mvUpperFrames; // To collect the Upper std::vector<SwFrame*> mvUpperFrames; // To collect the Upper
sal_uLong nIndex; // The Index of the to-be-inserted Nodes sal_uLong mnIndex; // The Index of the to-be-inserted Nodes
bool bMaster : 1; // true => only Master, false => only Frames without Follow bool mbMaster : 1; // true => only Master, false => only Frames without Follow
bool bInit : 1; // Did we already call First() at SwClient? bool mbInit : 1; // Did we already call First() at SwClient?
SwNode2LayImpl(const SwNode2LayImpl&) = delete; SwNode2LayImpl(const SwNode2LayImpl&) = delete;
SwNode2LayImpl& operator=(const SwNode2LayImpl&) = delete; SwNode2LayImpl& operator=(const SwNode2LayImpl&) = delete;
@@ -134,26 +134,26 @@ static SwNode* GoPreviousWithFrame(SwNodeIndex *pIdx)
* We insert before or after it. * We insert before or after it.
*/ */
SwNode2LayImpl::SwNode2LayImpl( const SwNode& rNode, sal_uLong nIdx, bool bSearch ) SwNode2LayImpl::SwNode2LayImpl( const SwNode& rNode, sal_uLong nIdx, bool bSearch )
: nIndex( nIdx ), bInit( false ) : mnIndex( nIdx ), mbInit( false )
{ {
const SwNode* pNd; const SwNode* pNd;
if( bSearch || rNode.IsSectionNode() ) if( bSearch || rNode.IsSectionNode() )
{ {
// Find the next Content/TableNode that contains a Frame, so that we can add // Find the next Content/TableNode that contains a Frame, so that we can add
// ourselves before/after it // ourselves before/after it
if( !bSearch && rNode.GetIndex() < nIndex ) if( !bSearch && rNode.GetIndex() < mnIndex )
{ {
SwNodeIndex aTmp( *rNode.EndOfSectionNode(), +1 ); SwNodeIndex aTmp( *rNode.EndOfSectionNode(), +1 );
pNd = GoPreviousWithFrame( &aTmp ); pNd = GoPreviousWithFrame( &aTmp );
if( pNd && rNode.GetIndex() > pNd->GetIndex() ) if( pNd && rNode.GetIndex() > pNd->GetIndex() )
pNd = nullptr; // Do not go over the limits pNd = nullptr; // Do not go over the limits
bMaster = false; mbMaster = false;
} }
else else
{ {
SwNodeIndex aTmp( rNode, -1 ); SwNodeIndex aTmp( rNode, -1 );
pNd = GoNextWithFrame( rNode.GetNodes(), &aTmp ); pNd = GoNextWithFrame( rNode.GetNodes(), &aTmp );
bMaster = true; mbMaster = true;
if( !bSearch && pNd && rNode.EndOfSectionIndex() < pNd->GetIndex() ) if( !bSearch && pNd && rNode.EndOfSectionIndex() < pNd->GetIndex() )
pNd = nullptr; // Do not go over the limits pNd = nullptr; // Do not go over the limits
} }
@@ -161,23 +161,23 @@ SwNode2LayImpl::SwNode2LayImpl( const SwNode& rNode, sal_uLong nIdx, bool bSearc
else else
{ {
pNd = &rNode; pNd = &rNode;
bMaster = nIndex < rNode.GetIndex(); mbMaster = mnIndex < rNode.GetIndex();
} }
if( pNd ) if( pNd )
{ {
if( pNd->IsContentNode() ) if( pNd->IsContentNode() )
pMod = const_cast<SwModify*>(static_cast<SwModify const *>(pNd->GetContentNode())); mpMod = const_cast<SwModify*>(static_cast<SwModify const *>(pNd->GetContentNode()));
else else
{ {
assert(pNd->IsTableNode()); assert(pNd->IsTableNode());
pMod = pNd->GetTableNode()->GetTable().GetFrameFormat(); mpMod = pNd->GetTableNode()->GetTable().GetFrameFormat();
} }
pIter.reset(new SwIterator<SwFrame, SwModify, sw::IteratorMode::UnwrapMulti>(*pMod)); mpIter.reset(new SwIterator<SwFrame, SwModify, sw::IteratorMode::UnwrapMulti>(*mpMod));
} }
else else
{ {
pIter = nullptr; mpIter = nullptr;
pMod = nullptr; mpMod = nullptr;
} }
} }
@@ -198,15 +198,15 @@ SwNode2LayImpl::SwNode2LayImpl( const SwNode& rNode, sal_uLong nIdx, bool bSearc
SwFrame* SwNode2LayImpl::NextFrame() SwFrame* SwNode2LayImpl::NextFrame()
{ {
SwFrame* pRet; SwFrame* pRet;
if( !pIter ) if( !mpIter )
return nullptr; return nullptr;
if( !bInit ) if( !mbInit )
{ {
pRet = pIter->First(); pRet = mpIter->First();
bInit = true; mbInit = true;
} }
else else
pRet = pIter->Next(); pRet = mpIter->Next();
while( pRet ) while( pRet )
{ {
SwFlowFrame* pFlow = SwFlowFrame::CastFlowFrame( pRet ); SwFlowFrame* pFlow = SwFlowFrame::CastFlowFrame( pRet );
@@ -216,7 +216,7 @@ SwFrame* SwNode2LayImpl::NextFrame()
// and iterate through it until the last Follow // and iterate through it until the last Follow
if( !pFlow->IsFollow() ) if( !pFlow->IsFollow() )
{ {
if( !bMaster ) if( !mbMaster )
{ {
while( pFlow->HasFollow() ) while( pFlow->HasFollow() )
pFlow = pFlow->GetFollow(); pFlow = pFlow->GetFollow();
@@ -238,18 +238,18 @@ SwFrame* SwNode2LayImpl::NextFrame()
// If the result Frame is located within a Section Frame // If the result Frame is located within a Section Frame
// whose Section does not contain the Node, we return with // whose Section does not contain the Node, we return with
// the SectionFrame, else we return with the Content/TabFrame // the SectionFrame, else we return with the Content/TabFrame
if( bMaster ) if( mbMaster )
{ {
if( pNd->GetIndex() >= nIndex ) if( pNd->GetIndex() >= mnIndex )
pRet = pSct; pRet = pSct;
} }
else if( pNd->EndOfSectionIndex() < nIndex ) else if( pNd->EndOfSectionIndex() < mnIndex )
pRet = pSct; pRet = pSct;
} }
} }
return pRet; return pRet;
} }
pRet = pIter->Next(); pRet = mpIter->Next();
} }
return nullptr; return nullptr;
} }
@@ -273,8 +273,8 @@ void SwNode2LayImpl::SaveUpperFrames()
mvUpperFrames.push_back( pFrame ); mvUpperFrames.push_back( pFrame );
} }
} }
pIter.reset(); mpIter.reset();
pMod = nullptr; mpMod = nullptr;
} }
SwLayoutFrame* SwNode2LayImpl::UpperFrame( SwFrame* &rpFrame, const SwNode &rNode ) SwLayoutFrame* SwNode2LayImpl::UpperFrame( SwFrame* &rpFrame, const SwNode &rNode )
@@ -288,7 +288,7 @@ SwLayoutFrame* SwNode2LayImpl::UpperFrame( SwFrame* &rpFrame, const SwNode &rNod
const SwNode* pNode = rNode.StartOfSectionNode(); const SwNode* pNode = rNode.StartOfSectionNode();
if( pNode->IsSectionNode() ) if( pNode->IsSectionNode() )
{ {
SwFrame* pFrame = bMaster ? rpFrame->FindPrev() : rpFrame->FindNext(); SwFrame* pFrame = mbMaster ? rpFrame->FindPrev() : rpFrame->FindNext();
if( pFrame && pFrame->IsSctFrame() ) if( pFrame && pFrame->IsSctFrame() )
{ {
// pFrame could be a "dummy"-section // pFrame could be a "dummy"-section
@@ -307,7 +307,7 @@ SwLayoutFrame* SwNode2LayImpl::UpperFrame( SwFrame* &rpFrame, const SwNode &rNod
pFrame = static_cast<SwLayoutFrame*>(pFrame)->Lower(); pFrame = static_cast<SwLayoutFrame*>(pFrame)->Lower();
} }
assert(pFrame->IsLayoutFrame()); assert(pFrame->IsLayoutFrame());
rpFrame = bMaster ? nullptr rpFrame = mbMaster ? nullptr
: static_cast<SwLayoutFrame*>(pFrame)->Lower(); : static_cast<SwLayoutFrame*>(pFrame)->Lower();
assert((!rpFrame || rpFrame->IsFlowFrame()) && assert((!rpFrame || rpFrame->IsFlowFrame()) &&
"<SwNode2LayImpl::UpperFrame(..)> - expected sibling isn't a flow frame." ); "<SwNode2LayImpl::UpperFrame(..)> - expected sibling isn't a flow frame." );
@@ -316,7 +316,7 @@ SwLayoutFrame* SwNode2LayImpl::UpperFrame( SwFrame* &rpFrame, const SwNode &rNod
pUpper = new SwSectionFrame(const_cast<SwSectionNode*>(static_cast<const SwSectionNode*>(pNode))->GetSection(), rpFrame); pUpper = new SwSectionFrame(const_cast<SwSectionNode*>(static_cast<const SwSectionNode*>(pNode))->GetSection(), rpFrame);
pUpper->Paste( rpFrame->GetUpper(), pUpper->Paste( rpFrame->GetUpper(),
bMaster ? rpFrame : rpFrame->GetNext() ); mbMaster ? rpFrame : rpFrame->GetNext() );
static_cast<SwSectionFrame*>(pUpper)->Init(); static_cast<SwSectionFrame*>(pUpper)->Init();
rpFrame = nullptr; rpFrame = nullptr;
// 'Go down' the section frame as long as the layout frame // 'Go down' the section frame as long as the layout frame
@@ -331,7 +331,7 @@ SwLayoutFrame* SwNode2LayImpl::UpperFrame( SwFrame* &rpFrame, const SwNode &rNod
} }
} }
} }
if( !bMaster ) if( !mbMaster )
rpFrame = rpFrame->GetNext(); rpFrame = rpFrame->GetNext();
return pUpper; return pUpper;
} }
@@ -421,7 +421,7 @@ SwFrame* SwNode2LayImpl::GetFrame( const Point* pDocPos ) const
tmp.first = *pDocPos; tmp.first = *pDocPos;
tmp.second = false; tmp.second = false;
} }
return pMod ? ::GetFrameOfModify(nullptr, *pMod, FRM_ALL, nullptr, pDocPos ? &tmp : nullptr) : nullptr; return mpMod ? ::GetFrameOfModify(nullptr, *mpMod, FRM_ALL, nullptr, pDocPos ? &tmp : nullptr) : nullptr;
} }
SwNode2Layout::SwNode2Layout( const SwNode& rNd, sal_uLong nIdx ) SwNode2Layout::SwNode2Layout( const SwNode& rNd, sal_uLong nIdx )

View File

@@ -23,7 +23,7 @@
// #i73788# // #i73788#
SwRetrievedInputStreamDataManager::tDataKey SwRetrievedInputStreamDataManager::mnNextKeyValue = 1; SwRetrievedInputStreamDataManager::tDataKey SwRetrievedInputStreamDataManager::snNextKeyValue = 1;
namespace namespace
{ {
@@ -44,18 +44,18 @@ SwRetrievedInputStreamDataManager::tDataKey SwRetrievedInputStreamDataManager::R
osl::MutexGuard aGuard(maMutex); osl::MutexGuard aGuard(maMutex);
// create empty data container for given thread Consumer // create empty data container for given thread Consumer
tDataKey nDataKey( mnNextKeyValue ); tDataKey nDataKey( snNextKeyValue );
tData aNewEntry( pThreadConsumer ); tData aNewEntry( pThreadConsumer );
maInputStreamData[ nDataKey ] = aNewEntry; maInputStreamData[ nDataKey ] = aNewEntry;
// prepare next data key value // prepare next data key value
if ( mnNextKeyValue < SAL_MAX_UINT64 ) if ( snNextKeyValue < SAL_MAX_UINT64 )
{ {
++mnNextKeyValue; ++snNextKeyValue;
} }
else else
{ {
mnNextKeyValue = 1; snNextKeyValue = 1;
} }
return nDataKey; return nDataKey;

View File

@@ -78,7 +78,7 @@ class SwRetrievedInputStreamDataManager
private: private:
static tDataKey mnNextKeyValue; static tDataKey snNextKeyValue;
osl::Mutex maMutex; osl::Mutex maMutex;

View File

@@ -469,17 +469,17 @@ uno::Sequence< OUString > SwXDrawPage::getSupportedServiceNames()
} }
SwXDrawPage::SwXDrawPage(SwDoc* pDc) : SwXDrawPage::SwXDrawPage(SwDoc* pDc) :
pDoc(pDc), m_pDoc(pDc),
pDrawPage(nullptr) m_pDrawPage(nullptr)
{ {
} }
SwXDrawPage::~SwXDrawPage() SwXDrawPage::~SwXDrawPage()
{ {
if(xPageAgg.is()) if(m_xPageAgg.is())
{ {
uno::Reference< uno::XInterface > xInt; uno::Reference< uno::XInterface > xInt;
xPageAgg->setDelegator(xInt); m_xPageAgg->setDelegator(xInt);
} }
} }
@@ -513,27 +513,27 @@ uno::Sequence< uno::Type > SwXDrawPage::getTypes()
sal_Int32 SwXDrawPage::getCount() sal_Int32 SwXDrawPage::getCount()
{ {
SolarMutexGuard aGuard; SolarMutexGuard aGuard;
if(!pDoc) if(!m_pDoc)
throw uno::RuntimeException(); throw uno::RuntimeException();
if(!pDoc->getIDocumentDrawModelAccess().GetDrawModel()) if(!m_pDoc->getIDocumentDrawModelAccess().GetDrawModel())
return 0; return 0;
else else
{ {
GetSvxPage(); GetSvxPage();
return SwTextBoxHelper::getCount(pDrawPage->GetSdrPage()); return SwTextBoxHelper::getCount(m_pDrawPage->GetSdrPage());
} }
} }
uno::Any SwXDrawPage::getByIndex(sal_Int32 nIndex) uno::Any SwXDrawPage::getByIndex(sal_Int32 nIndex)
{ {
SolarMutexGuard aGuard; SolarMutexGuard aGuard;
if(!pDoc) if(!m_pDoc)
throw uno::RuntimeException(); throw uno::RuntimeException();
if(!pDoc->getIDocumentDrawModelAccess().GetDrawModel()) if(!m_pDoc->getIDocumentDrawModelAccess().GetDrawModel())
throw lang::IndexOutOfBoundsException(); throw lang::IndexOutOfBoundsException();
GetSvxPage(); GetSvxPage();
return SwTextBoxHelper::getByIndex(pDrawPage->GetSdrPage(), nIndex); return SwTextBoxHelper::getByIndex(m_pDrawPage->GetSdrPage(), nIndex);
} }
uno::Type SwXDrawPage::getElementType() uno::Type SwXDrawPage::getElementType()
@@ -544,9 +544,9 @@ uno::Type SwXDrawPage::getElementType()
sal_Bool SwXDrawPage::hasElements() sal_Bool SwXDrawPage::hasElements()
{ {
SolarMutexGuard aGuard; SolarMutexGuard aGuard;
if(!pDoc) if(!m_pDoc)
throw uno::RuntimeException(); throw uno::RuntimeException();
if(!pDoc->getIDocumentDrawModelAccess().GetDrawModel()) if(!m_pDoc->getIDocumentDrawModelAccess().GetDrawModel())
return false; return false;
else else
return GetSvxPage()->hasElements(); return GetSvxPage()->hasElements();
@@ -555,7 +555,7 @@ sal_Bool SwXDrawPage::hasElements()
void SwXDrawPage::add(const uno::Reference< drawing::XShape > & xShape) void SwXDrawPage::add(const uno::Reference< drawing::XShape > & xShape)
{ {
SolarMutexGuard aGuard; SolarMutexGuard aGuard;
if(!pDoc) if(!m_pDoc)
throw uno::RuntimeException(); throw uno::RuntimeException();
uno::Reference< lang::XUnoTunnel > xShapeTunnel(xShape, uno::UNO_QUERY); uno::Reference< lang::XUnoTunnel > xShapeTunnel(xShape, uno::UNO_QUERY);
SwXShape* pShape = nullptr; SwXShape* pShape = nullptr;
@@ -594,7 +594,7 @@ void SwXDrawPage::add(const uno::Reference< drawing::XShape > & xShape)
// now evaluate the properties of SwShapeDescriptor_Impl // now evaluate the properties of SwShapeDescriptor_Impl
SwShapeDescriptor_Impl* pDesc = pShape->GetDescImpl(); SwShapeDescriptor_Impl* pDesc = pShape->GetDescImpl();
SfxItemSet aSet( pDoc->GetAttrPool(), svl::Items<RES_FRMATR_BEGIN, SfxItemSet aSet( m_pDoc->GetAttrPool(), svl::Items<RES_FRMATR_BEGIN,
RES_FRMATR_END-1>{} ); RES_FRMATR_END-1>{} );
SwFormatAnchor aAnchor( RndStdIds::FLY_AS_CHAR ); SwFormatAnchor aAnchor( RndStdIds::FLY_AS_CHAR );
bool bOpaque = false; bool bOpaque = false;
@@ -661,16 +661,16 @@ void SwXDrawPage::add(const uno::Reference< drawing::XShape > & xShape)
// #108784# - set layer of new drawing object to corresponding // #108784# - set layer of new drawing object to corresponding
// invisible layer. // invisible layer.
if(SdrInventor::FmForm != pObj->GetObjInventor()) if(SdrInventor::FmForm != pObj->GetObjInventor())
pObj->SetLayer( bOpaque ? pDoc->getIDocumentDrawModelAccess().GetInvisibleHeavenId() : pDoc->getIDocumentDrawModelAccess().GetInvisibleHellId() ); pObj->SetLayer( bOpaque ? m_pDoc->getIDocumentDrawModelAccess().GetInvisibleHeavenId() : m_pDoc->getIDocumentDrawModelAccess().GetInvisibleHellId() );
else else
pObj->SetLayer(pDoc->getIDocumentDrawModelAccess().GetInvisibleControlsId()); pObj->SetLayer(m_pDoc->getIDocumentDrawModelAccess().GetInvisibleControlsId());
std::unique_ptr<SwPaM> pPam(new SwPaM(pDoc->GetNodes().GetEndOfContent())); std::unique_ptr<SwPaM> pPam(new SwPaM(m_pDoc->GetNodes().GetEndOfContent()));
std::unique_ptr<SwUnoInternalPaM> pInternalPam; std::unique_ptr<SwUnoInternalPaM> pInternalPam;
uno::Reference< text::XTextRange > xRg; uno::Reference< text::XTextRange > xRg;
if( pDesc && (xRg = pDesc->GetTextRange()).is() ) if( pDesc && (xRg = pDesc->GetTextRange()).is() )
{ {
pInternalPam.reset(new SwUnoInternalPaM(*pDoc)); pInternalPam.reset(new SwUnoInternalPaM(*m_pDoc));
if (!::sw::XTextRangeToSwPaM(*pInternalPam, xRg)) if (!::sw::XTextRangeToSwPaM(*pInternalPam, xRg))
throw uno::RuntimeException(); throw uno::RuntimeException();
@@ -685,11 +685,11 @@ void SwXDrawPage::add(const uno::Reference< drawing::XShape > & xShape)
} }
} }
else if ((aAnchor.GetAnchorId() != RndStdIds::FLY_AT_PAGE) && pDoc->getIDocumentLayoutAccess().GetCurrentLayout()) else if ((aAnchor.GetAnchorId() != RndStdIds::FLY_AT_PAGE) && m_pDoc->getIDocumentLayoutAccess().GetCurrentLayout())
{ {
SwCursorMoveState aState( CursorMoveState::SetOnlyText ); SwCursorMoveState aState( CursorMoveState::SetOnlyText );
Point aTmp(convertMm100ToTwip(aMM100Pos.X), convertMm100ToTwip(aMM100Pos.Y)); Point aTmp(convertMm100ToTwip(aMM100Pos.X), convertMm100ToTwip(aMM100Pos.Y));
pDoc->getIDocumentLayoutAccess().GetCurrentLayout()->GetModelPositionForViewPoint( pPam->GetPoint(), aTmp, &aState ); m_pDoc->getIDocumentLayoutAccess().GetCurrentLayout()->GetModelPositionForViewPoint( pPam->GetPoint(), aTmp, &aState );
aAnchor.SetAnchor( pPam->GetPoint() ); aAnchor.SetAnchor( pPam->GetPoint() );
// #i32349# - adjustment of vertical positioning // #i32349# - adjustment of vertical positioning
@@ -706,12 +706,12 @@ void SwXDrawPage::add(const uno::Reference< drawing::XShape > & xShape)
SwPaM* pTemp = pInternalPam.get(); SwPaM* pTemp = pInternalPam.get();
if ( !pTemp ) if ( !pTemp )
pTemp = pPam.get(); pTemp = pPam.get();
UnoActionContext aAction(pDoc); UnoActionContext aAction(m_pDoc);
pDoc->getIDocumentContentOperations().InsertDrawObj( *pTemp, *pObj, aSet ); m_pDoc->getIDocumentContentOperations().InsertDrawObj( *pTemp, *pObj, aSet );
if (pSvxShape->GetSdrObject()->GetName().isEmpty()) if (pSvxShape->GetSdrObject()->GetName().isEmpty())
{ {
pSvxShape->GetSdrObject()->SetName(pDoc->GetUniqueShapeName()); pSvxShape->GetSdrObject()->SetName(m_pDoc->GetUniqueShapeName());
} }
SwFrameFormat* pFormat = ::FindFrameFormat( pObj ); SwFrameFormat* pFormat = ::FindFrameFormat( pObj );
@@ -732,7 +732,7 @@ void SwXDrawPage::add(const uno::Reference< drawing::XShape > & xShape)
void SwXDrawPage::remove(const uno::Reference< drawing::XShape > & xShape) void SwXDrawPage::remove(const uno::Reference< drawing::XShape > & xShape)
{ {
SolarMutexGuard aGuard; SolarMutexGuard aGuard;
if(!pDoc) if(!m_pDoc)
throw uno::RuntimeException(); throw uno::RuntimeException();
uno::Reference<lang::XComponent> xComp(xShape, uno::UNO_QUERY); uno::Reference<lang::XComponent> xComp(xShape, uno::UNO_QUERY);
xComp->dispose(); xComp->dispose();
@@ -741,10 +741,10 @@ void SwXDrawPage::remove(const uno::Reference< drawing::XShape > & xShape)
uno::Reference< drawing::XShapeGroup > SwXDrawPage::group(const uno::Reference< drawing::XShapes > & xShapes) uno::Reference< drawing::XShapeGroup > SwXDrawPage::group(const uno::Reference< drawing::XShapes > & xShapes)
{ {
SolarMutexGuard aGuard; SolarMutexGuard aGuard;
if(!pDoc || !xShapes.is()) if(!m_pDoc || !xShapes.is())
throw uno::RuntimeException(); throw uno::RuntimeException();
uno::Reference< drawing::XShapeGroup > xRet; uno::Reference< drawing::XShapeGroup > xRet;
if(xPageAgg.is()) if(m_xPageAgg.is())
{ {
SwFmDrawPage* pPage = GetSvxPage(); SwFmDrawPage* pPage = GetSvxPage();
@@ -764,11 +764,11 @@ uno::Reference< drawing::XShapeGroup > SwXDrawPage::group(const uno::Reference<
} }
} }
UnoActionContext aContext(pDoc); UnoActionContext aContext(m_pDoc);
pDoc->GetIDocumentUndoRedo().StartUndo( SwUndoId::START, nullptr ); m_pDoc->GetIDocumentUndoRedo().StartUndo( SwUndoId::START, nullptr );
SwDrawContact* pContact = pDoc->GroupSelection( *pPage->GetDrawView() ); SwDrawContact* pContact = m_pDoc->GroupSelection( *pPage->GetDrawView() );
pDoc->ChgAnchor( m_pDoc->ChgAnchor(
pPage->GetDrawView()->GetMarkedObjectList(), pPage->GetDrawView()->GetMarkedObjectList(),
RndStdIds::FLY_AT_PARA, RndStdIds::FLY_AT_PARA,
true, false ); true, false );
@@ -776,7 +776,7 @@ uno::Reference< drawing::XShapeGroup > SwXDrawPage::group(const uno::Reference<
pPage->GetDrawView()->UnmarkAll(); pPage->GetDrawView()->UnmarkAll();
if(pContact) if(pContact)
xRet = SwFmDrawPage::GetShapeGroup( pContact->GetMaster() ); xRet = SwFmDrawPage::GetShapeGroup( pContact->GetMaster() );
pDoc->GetIDocumentUndoRedo().EndUndo( SwUndoId::END, nullptr ); m_pDoc->GetIDocumentUndoRedo().EndUndo( SwUndoId::END, nullptr );
} }
pPage->RemovePageView(); pPage->RemovePageView();
} }
@@ -787,9 +787,9 @@ uno::Reference< drawing::XShapeGroup > SwXDrawPage::group(const uno::Reference<
void SwXDrawPage::ungroup(const uno::Reference< drawing::XShapeGroup > & rShapeGroup) void SwXDrawPage::ungroup(const uno::Reference< drawing::XShapeGroup > & rShapeGroup)
{ {
SolarMutexGuard aGuard; SolarMutexGuard aGuard;
if(!pDoc) if(!m_pDoc)
throw uno::RuntimeException(); throw uno::RuntimeException();
if(!xPageAgg.is()) if(!m_xPageAgg.is())
return; return;
SwFmDrawPage* pPage = GetSvxPage(); SwFmDrawPage* pPage = GetSvxPage();
@@ -797,38 +797,38 @@ void SwXDrawPage::ungroup(const uno::Reference< drawing::XShapeGroup > & rShapeG
return; return;
pPage->PreUnGroup(rShapeGroup); pPage->PreUnGroup(rShapeGroup);
UnoActionContext aContext(pDoc); UnoActionContext aContext(m_pDoc);
pDoc->GetIDocumentUndoRedo().StartUndo( SwUndoId::START, nullptr ); m_pDoc->GetIDocumentUndoRedo().StartUndo( SwUndoId::START, nullptr );
pDoc->UnGroupSelection( *pPage->GetDrawView() ); m_pDoc->UnGroupSelection( *pPage->GetDrawView() );
pDoc->ChgAnchor( pPage->GetDrawView()->GetMarkedObjectList(), m_pDoc->ChgAnchor( pPage->GetDrawView()->GetMarkedObjectList(),
RndStdIds::FLY_AT_PARA, RndStdIds::FLY_AT_PARA,
true, false ); true, false );
pDoc->GetIDocumentUndoRedo().EndUndo( SwUndoId::END, nullptr ); m_pDoc->GetIDocumentUndoRedo().EndUndo( SwUndoId::END, nullptr );
pPage->RemovePageView(); pPage->RemovePageView();
} }
SwFmDrawPage* SwXDrawPage::GetSvxPage() SwFmDrawPage* SwXDrawPage::GetSvxPage()
{ {
if(!xPageAgg.is() && pDoc) if(!m_xPageAgg.is() && m_pDoc)
{ {
SolarMutexGuard aGuard; SolarMutexGuard aGuard;
// #i52858# // #i52858#
SwDrawModel* pModel = pDoc->getIDocumentDrawModelAccess().GetOrCreateDrawModel(); SwDrawModel* pModel = m_pDoc->getIDocumentDrawModelAccess().GetOrCreateDrawModel();
SdrPage* pPage = pModel->GetPage( 0 ); SdrPage* pPage = pModel->GetPage( 0 );
{ {
// We need a Ref to the object during queryInterface or else // We need a Ref to the object during queryInterface or else
// it will be deleted // it will be deleted
pDrawPage = new SwFmDrawPage(pPage); m_pDrawPage = new SwFmDrawPage(pPage);
uno::Reference< drawing::XDrawPage > xPage = pDrawPage; uno::Reference< drawing::XDrawPage > xPage = m_pDrawPage;
uno::Any aAgg = xPage->queryInterface(cppu::UnoType<uno::XAggregation>::get()); uno::Any aAgg = xPage->queryInterface(cppu::UnoType<uno::XAggregation>::get());
aAgg >>= xPageAgg; aAgg >>= m_xPageAgg;
} }
if( xPageAgg.is() ) if( m_xPageAgg.is() )
xPageAgg->setDelegator( static_cast<cppu::OWeakObject*>(this) ); m_xPageAgg->setDelegator( static_cast<cppu::OWeakObject*>(this) );
} }
return pDrawPage; return m_pDrawPage;
} }
/** /**
@@ -836,7 +836,7 @@ SwFmDrawPage* SwXDrawPage::GetSvxPage()
*/ */
void SwXDrawPage::InvalidateSwDoc() void SwXDrawPage::InvalidateSwDoc()
{ {
pDoc = nullptr; m_pDoc = nullptr;
} }
namespace namespace
@@ -856,10 +856,10 @@ sal_Int64 SAL_CALL SwXShape::getSomething( const uno::Sequence< sal_Int8 >& rId
return sal::static_int_cast< sal_Int64 >( reinterpret_cast< sal_IntPtr >(this) ); return sal::static_int_cast< sal_Int64 >( reinterpret_cast< sal_IntPtr >(this) );
} }
if( xShapeAgg.is() ) if( m_xShapeAgg.is() )
{ {
const uno::Type& rTunnelType = cppu::UnoType<lang::XUnoTunnel>::get(); const uno::Type& rTunnelType = cppu::UnoType<lang::XUnoTunnel>::get();
uno::Any aAgg = xShapeAgg->queryAggregation( rTunnelType ); uno::Any aAgg = m_xShapeAgg->queryAggregation( rTunnelType );
if(auto xAggTunnel = o3tl::tryAccess<uno::Reference<lang::XUnoTunnel>>( if(auto xAggTunnel = o3tl::tryAccess<uno::Reference<lang::XUnoTunnel>>(
aAgg)) aAgg))
{ {
@@ -885,7 +885,7 @@ SwXShape::SwXShape(
, m_pFormat(nullptr) , m_pFormat(nullptr)
, m_pPropSet(aSwMapProvider.GetPropertySet(PROPERTY_MAP_TEXT_SHAPE)) , m_pPropSet(aSwMapProvider.GetPropertySet(PROPERTY_MAP_TEXT_SHAPE))
, m_pPropertyMapEntries(aSwMapProvider.GetPropertyMapEntries(PROPERTY_MAP_TEXT_SHAPE)) , m_pPropertyMapEntries(aSwMapProvider.GetPropertyMapEntries(PROPERTY_MAP_TEXT_SHAPE))
, pImpl(new SwShapeDescriptor_Impl(pDoc)) , m_pImpl(new SwShapeDescriptor_Impl(pDoc))
, m_bDescriptor(true) , m_bDescriptor(true)
{ {
if(!xShape.is()) // default Ctor if(!xShape.is()) // default Ctor
@@ -895,22 +895,22 @@ SwXShape::SwXShape(
//aAgg contains a reference of the SvxShape! //aAgg contains a reference of the SvxShape!
{ {
uno::Any aAgg = xShape->queryInterface(rAggType); uno::Any aAgg = xShape->queryInterface(rAggType);
aAgg >>= xShapeAgg; aAgg >>= m_xShapeAgg;
// #i31698# // #i31698#
if ( xShapeAgg.is() ) if ( m_xShapeAgg.is() )
{ {
xShapeAgg->queryAggregation( cppu::UnoType<drawing::XShape>::get()) >>= mxShape; m_xShapeAgg->queryAggregation( cppu::UnoType<drawing::XShape>::get()) >>= mxShape;
OSL_ENSURE( mxShape.is(), OSL_ENSURE( mxShape.is(),
"<SwXShape::SwXShape(..)> - no XShape found at <xShapeAgg>" ); "<SwXShape::SwXShape(..)> - no XShape found at <xShapeAgg>" );
} }
} }
xShape = nullptr; xShape = nullptr;
osl_atomic_increment(&m_refCount); osl_atomic_increment(&m_refCount);
if( xShapeAgg.is() ) if( m_xShapeAgg.is() )
xShapeAgg->setDelegator( static_cast<cppu::OWeakObject*>(this) ); m_xShapeAgg->setDelegator( static_cast<cppu::OWeakObject*>(this) );
osl_atomic_decrement(&m_refCount); osl_atomic_decrement(&m_refCount);
SvxShape* pShape = comphelper::getUnoTunnelImplementation<SvxShape>(xShapeAgg); SvxShape* pShape = comphelper::getUnoTunnelImplementation<SvxShape>(m_xShapeAgg);
SdrObject* pObj = pShape ? pShape->GetSdrObject() : nullptr; SdrObject* pObj = pShape ? pShape->GetSdrObject() : nullptr;
if(pObj) if(pObj)
@@ -920,7 +920,7 @@ SwXShape::SwXShape(
SetFrameFormat(pFormat); SetFrameFormat(pFormat);
lcl_addShapePropertyEventFactories( *pObj, *this ); lcl_addShapePropertyEventFactories( *pObj, *this );
pImpl->bInitializedPropertyNotifier = true; m_pImpl->bInitializedPropertyNotifier = true;
} }
} }
@@ -946,10 +946,10 @@ void SwXShape::AddExistingShapeToFormat( SdrObject const & _rObj )
pSwShape->m_bDescriptor = false; pSwShape->m_bDescriptor = false;
} }
if ( !pSwShape->pImpl->bInitializedPropertyNotifier ) if ( !pSwShape->m_pImpl->bInitializedPropertyNotifier )
{ {
lcl_addShapePropertyEventFactories( *pCurrent, *pSwShape ); lcl_addShapePropertyEventFactories( *pCurrent, *pSwShape );
pSwShape->pImpl->bInitializedPropertyNotifier = true; pSwShape->m_pImpl->bInitializedPropertyNotifier = true;
} }
} }
} }
@@ -958,12 +958,12 @@ void SwXShape::AddExistingShapeToFormat( SdrObject const & _rObj )
SwXShape::~SwXShape() SwXShape::~SwXShape()
{ {
SolarMutexGuard aGuard; SolarMutexGuard aGuard;
if (xShapeAgg.is()) if (m_xShapeAgg.is())
{ {
uno::Reference< uno::XInterface > xRef; uno::Reference< uno::XInterface > xRef;
xShapeAgg->setDelegator(xRef); m_xShapeAgg->setDelegator(xRef);
} }
pImpl.reset(); m_pImpl.reset();
EndListeningAll(); EndListeningAll();
if(m_pPage) if(m_pPage)
const_cast<SwFmDrawPage*>(m_pPage)->RemoveShape(this); const_cast<SwFmDrawPage*>(m_pPage)->RemoveShape(this);
@@ -980,12 +980,12 @@ uno::Any SwXShape::queryInterface( const uno::Type& aType )
// #i53320# - follow-up of #i31698# // #i53320# - follow-up of #i31698#
// interface drawing::XShape is overloaded. Thus, provide // interface drawing::XShape is overloaded. Thus, provide
// correct object instance. // correct object instance.
if(!aRet.hasValue() && xShapeAgg.is()) if(!aRet.hasValue() && m_xShapeAgg.is())
{ {
if(aType == cppu::UnoType<XShape>::get()) if(aType == cppu::UnoType<XShape>::get())
aRet <<= uno::Reference<XShape>(this); aRet <<= uno::Reference<XShape>(this);
else else
aRet = xShapeAgg->queryAggregation(aType); aRet = m_xShapeAgg->queryAggregation(aType);
} }
return aRet; return aRet;
} }
@@ -993,9 +993,9 @@ uno::Any SwXShape::queryInterface( const uno::Type& aType )
uno::Sequence< uno::Type > SwXShape::getTypes( ) uno::Sequence< uno::Type > SwXShape::getTypes( )
{ {
uno::Sequence< uno::Type > aRet = SwXShapeBaseClass::getTypes(); uno::Sequence< uno::Type > aRet = SwXShapeBaseClass::getTypes();
if(xShapeAgg.is()) if(m_xShapeAgg.is())
{ {
uno::Any aProv = xShapeAgg->queryAggregation(cppu::UnoType<XTypeProvider>::get()); uno::Any aProv = m_xShapeAgg->queryAggregation(cppu::UnoType<XTypeProvider>::get());
if(aProv.hasValue()) if(aProv.hasValue())
{ {
uno::Reference< XTypeProvider > xAggProv; uno::Reference< XTypeProvider > xAggProv;
@@ -1015,10 +1015,10 @@ uno::Reference< beans::XPropertySetInfo > SwXShape::getPropertySetInfo()
{ {
SolarMutexGuard aGuard; SolarMutexGuard aGuard;
uno::Reference< beans::XPropertySetInfo > aRet; uno::Reference< beans::XPropertySetInfo > aRet;
if(xShapeAgg.is()) if(m_xShapeAgg.is())
{ {
const uno::Type& rPropSetType = cppu::UnoType<beans::XPropertySet>::get(); const uno::Type& rPropSetType = cppu::UnoType<beans::XPropertySet>::get();
uno::Any aPSet = xShapeAgg->queryAggregation( rPropSetType ); uno::Any aPSet = m_xShapeAgg->queryAggregation( rPropSetType );
if(auto xPrSet = o3tl::tryAccess<uno::Reference<beans::XPropertySet>>( if(auto xPrSet = o3tl::tryAccess<uno::Reference<beans::XPropertySet>>(
aPSet)) aPSet))
{ {
@@ -1038,7 +1038,7 @@ void SwXShape::setPropertyValue(const OUString& rPropertyName, const uno::Any& a
SolarMutexGuard aGuard; SolarMutexGuard aGuard;
SwFrameFormat* pFormat = GetFrameFormat(); SwFrameFormat* pFormat = GetFrameFormat();
const SfxItemPropertySimpleEntry* pEntry = m_pPropSet->getPropertyMap().getByName( rPropertyName ); const SfxItemPropertySimpleEntry* pEntry = m_pPropSet->getPropertyMap().getByName( rPropertyName );
if(!xShapeAgg.is()) if(!m_xShapeAgg.is())
return; return;
if(pEntry) if(pEntry)
@@ -1348,44 +1348,44 @@ void SwXShape::setPropertyValue(const OUString& rPropertyName, const uno::Any& a
switch(pEntry->nWID) switch(pEntry->nWID)
{ {
case RES_ANCHOR: case RES_ANCHOR:
pItem = pImpl->GetAnchor(true); pItem = m_pImpl->GetAnchor(true);
break; break;
case RES_HORI_ORIENT: case RES_HORI_ORIENT:
pItem = pImpl->GetHOrient(true); pItem = m_pImpl->GetHOrient(true);
break; break;
case RES_VERT_ORIENT: case RES_VERT_ORIENT:
pItem = pImpl->GetVOrient(true); pItem = m_pImpl->GetVOrient(true);
break; break;
case RES_LR_SPACE: case RES_LR_SPACE:
pItem = pImpl->GetLRSpace(true); pItem = m_pImpl->GetLRSpace(true);
break; break;
case RES_UL_SPACE: case RES_UL_SPACE:
pItem = pImpl->GetULSpace(true); pItem = m_pImpl->GetULSpace(true);
break; break;
case RES_SURROUND: case RES_SURROUND:
pItem = pImpl->GetSurround(true); pItem = m_pImpl->GetSurround(true);
break; break;
case FN_TEXT_RANGE: case FN_TEXT_RANGE:
if(auto tr = o3tl::tryAccess< if(auto tr = o3tl::tryAccess<
uno::Reference<text::XTextRange>>(aValue)) uno::Reference<text::XTextRange>>(aValue))
{ {
uno::Reference< text::XTextRange > & rRange = pImpl->GetTextRange(); uno::Reference< text::XTextRange > & rRange = m_pImpl->GetTextRange();
rRange = *tr; rRange = *tr;
} }
break; break;
case RES_OPAQUE : case RES_OPAQUE :
pImpl->SetOpaque(*o3tl::doAccess<bool>(aValue)); m_pImpl->SetOpaque(*o3tl::doAccess<bool>(aValue));
break; break;
// #i26791# // #i26791#
case RES_FOLLOW_TEXT_FLOW: case RES_FOLLOW_TEXT_FLOW:
{ {
pItem = pImpl->GetFollowTextFlow( true ); pItem = m_pImpl->GetFollowTextFlow( true );
} }
break; break;
// #i28701# // #i28701#
case RES_WRAP_INFLUENCE_ON_OBJPOS: case RES_WRAP_INFLUENCE_ON_OBJPOS:
{ {
pItem = pImpl->GetWrapInfluenceOnObjPos( true ); pItem = m_pImpl->GetWrapInfluenceOnObjPos( true );
} }
break; break;
// #i28749# // #i28749#
@@ -1393,7 +1393,7 @@ void SwXShape::setPropertyValue(const OUString& rPropertyName, const uno::Any& a
{ {
sal_Int16 nPositionLayoutDir = 0; sal_Int16 nPositionLayoutDir = 0;
aValue >>= nPositionLayoutDir; aValue >>= nPositionLayoutDir;
pImpl->SetPositionLayoutDir( nPositionLayoutDir ); m_pImpl->SetPositionLayoutDir( nPositionLayoutDir );
} }
break; break;
} }
@@ -1405,7 +1405,7 @@ void SwXShape::setPropertyValue(const OUString& rPropertyName, const uno::Any& a
{ {
const uno::Type& rPSetType = const uno::Type& rPSetType =
cppu::UnoType<beans::XPropertySet>::get(); cppu::UnoType<beans::XPropertySet>::get();
uno::Any aPSet = xShapeAgg->queryAggregation(rPSetType); uno::Any aPSet = m_xShapeAgg->queryAggregation(rPSetType);
auto xPrSet = o3tl::tryAccess<uno::Reference<beans::XPropertySet>>( auto xPrSet = o3tl::tryAccess<uno::Reference<beans::XPropertySet>>(
aPSet); aPSet);
if(!xPrSet) if(!xPrSet)
@@ -1446,7 +1446,7 @@ uno::Any SwXShape::getPropertyValue(const OUString& rPropertyName)
SolarMutexGuard aGuard; SolarMutexGuard aGuard;
uno::Any aRet; uno::Any aRet;
SwFrameFormat* pFormat = GetFrameFormat(); SwFrameFormat* pFormat = GetFrameFormat();
if(xShapeAgg.is()) if(m_xShapeAgg.is())
{ {
const SfxItemPropertySimpleEntry* pEntry = m_pPropSet->getPropertyMap().getByName( rPropertyName ); const SfxItemPropertySimpleEntry* pEntry = m_pPropSet->getPropertyMap().getByName( rPropertyName );
if(pEntry) if(pEntry)
@@ -1593,28 +1593,28 @@ uno::Any SwXShape::getPropertyValue(const OUString& rPropertyName)
switch(pEntry->nWID) switch(pEntry->nWID)
{ {
case RES_ANCHOR: case RES_ANCHOR:
pItem = pImpl->GetAnchor(); pItem = m_pImpl->GetAnchor();
break; break;
case RES_HORI_ORIENT: case RES_HORI_ORIENT:
pItem = pImpl->GetHOrient(); pItem = m_pImpl->GetHOrient();
break; break;
case RES_VERT_ORIENT: case RES_VERT_ORIENT:
pItem = pImpl->GetVOrient(); pItem = m_pImpl->GetVOrient();
break; break;
case RES_LR_SPACE: case RES_LR_SPACE:
pItem = pImpl->GetLRSpace(); pItem = m_pImpl->GetLRSpace();
break; break;
case RES_UL_SPACE: case RES_UL_SPACE:
pItem = pImpl->GetULSpace(); pItem = m_pImpl->GetULSpace();
break; break;
case RES_SURROUND: case RES_SURROUND:
pItem = pImpl->GetSurround(); pItem = m_pImpl->GetSurround();
break; break;
case FN_TEXT_RANGE : case FN_TEXT_RANGE :
aRet <<= pImpl->GetTextRange(); aRet <<= m_pImpl->GetTextRange();
break; break;
case RES_OPAQUE : case RES_OPAQUE :
aRet <<= pImpl->GetOpaque(); aRet <<= m_pImpl->GetOpaque();
break; break;
case FN_ANCHOR_POSITION : case FN_ANCHOR_POSITION :
{ {
@@ -1624,13 +1624,13 @@ uno::Any SwXShape::getPropertyValue(const OUString& rPropertyName)
// #i26791# // #i26791#
case RES_FOLLOW_TEXT_FLOW : case RES_FOLLOW_TEXT_FLOW :
{ {
pItem = pImpl->GetFollowTextFlow(); pItem = m_pImpl->GetFollowTextFlow();
} }
break; break;
// #i28701# // #i28701#
case RES_WRAP_INFLUENCE_ON_OBJPOS: case RES_WRAP_INFLUENCE_ON_OBJPOS:
{ {
pItem = pImpl->GetWrapInfluenceOnObjPos(); pItem = m_pImpl->GetWrapInfluenceOnObjPos();
} }
break; break;
// #i28749# // #i28749#
@@ -1643,7 +1643,7 @@ uno::Any SwXShape::getPropertyValue(const OUString& rPropertyName)
break; break;
case FN_SHAPE_POSITION_LAYOUT_DIR: case FN_SHAPE_POSITION_LAYOUT_DIR:
{ {
aRet <<= pImpl->GetPositionLayoutDir(); aRet <<= m_pImpl->GetPositionLayoutDir();
} }
break; break;
// #i36248# // #i36248#
@@ -1732,7 +1732,7 @@ uno::Any SwXShape::_getPropAtAggrObj( const OUString& _rPropertyName )
const uno::Type& rPSetType = const uno::Type& rPSetType =
cppu::UnoType<beans::XPropertySet>::get(); cppu::UnoType<beans::XPropertySet>::get();
uno::Any aPSet = xShapeAgg->queryAggregation(rPSetType); uno::Any aPSet = m_xShapeAgg->queryAggregation(rPSetType);
auto xPrSet = o3tl::tryAccess<uno::Reference<beans::XPropertySet>>(aPSet); auto xPrSet = o3tl::tryAccess<uno::Reference<beans::XPropertySet>>(aPSet);
if ( !xPrSet ) if ( !xPrSet )
{ {
@@ -1757,7 +1757,7 @@ uno::Sequence< beans::PropertyState > SwXShape::getPropertyStates(
SolarMutexGuard aGuard; SolarMutexGuard aGuard;
SwFrameFormat* pFormat = GetFrameFormat(); SwFrameFormat* pFormat = GetFrameFormat();
uno::Sequence< beans::PropertyState > aRet(aPropertyNames.getLength()); uno::Sequence< beans::PropertyState > aRet(aPropertyNames.getLength());
if(!xShapeAgg.is()) if(!m_xShapeAgg.is())
throw uno::RuntimeException(); throw uno::RuntimeException();
SvxShape* pSvxShape = GetSvxShape(); SvxShape* pSvxShape = GetSvxShape();
@@ -1816,27 +1816,27 @@ uno::Sequence< beans::PropertyState > SwXShape::getPropertyStates(
switch(pEntry->nWID) switch(pEntry->nWID)
{ {
case RES_ANCHOR: case RES_ANCHOR:
pItem = pImpl->GetAnchor(); pItem = m_pImpl->GetAnchor();
break; break;
case RES_HORI_ORIENT: case RES_HORI_ORIENT:
pItem = pImpl->GetHOrient(); pItem = m_pImpl->GetHOrient();
break; break;
case RES_VERT_ORIENT: case RES_VERT_ORIENT:
pItem = pImpl->GetVOrient(); pItem = m_pImpl->GetVOrient();
break; break;
case RES_LR_SPACE: case RES_LR_SPACE:
pItem = pImpl->GetLRSpace(); pItem = m_pImpl->GetLRSpace();
break; break;
case RES_UL_SPACE: case RES_UL_SPACE:
pItem = pImpl->GetULSpace(); pItem = m_pImpl->GetULSpace();
break; break;
case RES_SURROUND: case RES_SURROUND:
pItem = pImpl->GetSurround(); pItem = m_pImpl->GetSurround();
break; break;
// #i28701# // #i28701#
case RES_WRAP_INFLUENCE_ON_OBJPOS: case RES_WRAP_INFLUENCE_ON_OBJPOS:
{ {
pItem = pImpl->GetWrapInfluenceOnObjPos(); pItem = m_pImpl->GetWrapInfluenceOnObjPos();
} }
break; break;
} }
@@ -1851,7 +1851,7 @@ uno::Sequence< beans::PropertyState > SwXShape::getPropertyStates(
if(!xShapePrState.is()) if(!xShapePrState.is())
{ {
const uno::Type& rPStateType = cppu::UnoType<XPropertyState>::get(); const uno::Type& rPStateType = cppu::UnoType<XPropertyState>::get();
uno::Any aPState = xShapeAgg->queryAggregation(rPStateType); uno::Any aPState = m_xShapeAgg->queryAggregation(rPStateType);
auto ps = o3tl::tryAccess<uno::Reference<XPropertyState>>( auto ps = o3tl::tryAccess<uno::Reference<XPropertyState>>(
aPState); aPState);
if(!ps) if(!ps)
@@ -1869,7 +1869,7 @@ void SwXShape::setPropertyToDefault( const OUString& rPropertyName )
{ {
SolarMutexGuard aGuard; SolarMutexGuard aGuard;
SwFrameFormat* pFormat = GetFrameFormat(); SwFrameFormat* pFormat = GetFrameFormat();
if(!xShapeAgg.is()) if(!m_xShapeAgg.is())
throw uno::RuntimeException(); throw uno::RuntimeException();
const SfxItemPropertySimpleEntry* pEntry = m_pPropSet->getPropertyMap().getByName( rPropertyName ); const SfxItemPropertySimpleEntry* pEntry = m_pPropSet->getPropertyMap().getByName( rPropertyName );
@@ -1889,25 +1889,25 @@ void SwXShape::setPropertyToDefault( const OUString& rPropertyName )
{ {
switch(pEntry->nWID) switch(pEntry->nWID)
{ {
case RES_ANCHOR: pImpl->RemoveAnchor(); break; case RES_ANCHOR: m_pImpl->RemoveAnchor(); break;
case RES_HORI_ORIENT: pImpl->RemoveHOrient(); break; case RES_HORI_ORIENT: m_pImpl->RemoveHOrient(); break;
case RES_VERT_ORIENT: pImpl->RemoveVOrient(); break; case RES_VERT_ORIENT: m_pImpl->RemoveVOrient(); break;
case RES_LR_SPACE: pImpl->RemoveLRSpace(); break; case RES_LR_SPACE: m_pImpl->RemoveLRSpace(); break;
case RES_UL_SPACE: pImpl->RemoveULSpace(); break; case RES_UL_SPACE: m_pImpl->RemoveULSpace(); break;
case RES_SURROUND: pImpl->RemoveSurround();break; case RES_SURROUND: m_pImpl->RemoveSurround();break;
case RES_OPAQUE : pImpl->SetOpaque(false); break; case RES_OPAQUE : m_pImpl->SetOpaque(false); break;
case FN_TEXT_RANGE : case FN_TEXT_RANGE :
break; break;
// #i26791# // #i26791#
case RES_FOLLOW_TEXT_FLOW: case RES_FOLLOW_TEXT_FLOW:
{ {
pImpl->RemoveFollowTextFlow(); m_pImpl->RemoveFollowTextFlow();
} }
break; break;
// #i28701# // #i28701#
case RES_WRAP_INFLUENCE_ON_OBJPOS: case RES_WRAP_INFLUENCE_ON_OBJPOS:
{ {
pImpl->RemoveWrapInfluenceOnObjPos(); m_pImpl->RemoveWrapInfluenceOnObjPos();
} }
break; break;
} }
@@ -1916,7 +1916,7 @@ void SwXShape::setPropertyToDefault( const OUString& rPropertyName )
else else
{ {
const uno::Type& rPStateType = cppu::UnoType<XPropertyState>::get(); const uno::Type& rPStateType = cppu::UnoType<XPropertyState>::get();
uno::Any aPState = xShapeAgg->queryAggregation(rPStateType); uno::Any aPState = m_xShapeAgg->queryAggregation(rPStateType);
auto xShapePrState = o3tl::tryAccess<uno::Reference<XPropertyState>>( auto xShapePrState = o3tl::tryAccess<uno::Reference<XPropertyState>>(
aPState); aPState);
if(!xShapePrState) if(!xShapePrState)
@@ -1931,7 +1931,7 @@ uno::Any SwXShape::getPropertyDefault( const OUString& rPropertyName )
SolarMutexGuard aGuard; SolarMutexGuard aGuard;
SwFrameFormat* pFormat = GetFrameFormat(); SwFrameFormat* pFormat = GetFrameFormat();
uno::Any aRet; uno::Any aRet;
if(!xShapeAgg.is()) if(!m_xShapeAgg.is())
throw uno::RuntimeException(); throw uno::RuntimeException();
const SfxItemPropertySimpleEntry* pEntry = m_pPropSet->getPropertyMap().getByName( rPropertyName ); const SfxItemPropertySimpleEntry* pEntry = m_pPropSet->getPropertyMap().getByName( rPropertyName );
@@ -1948,7 +1948,7 @@ uno::Any SwXShape::getPropertyDefault( const OUString& rPropertyName )
else else
{ {
const uno::Type& rPStateType = cppu::UnoType<XPropertyState>::get(); const uno::Type& rPStateType = cppu::UnoType<XPropertyState>::get();
uno::Any aPState = xShapeAgg->queryAggregation(rPStateType); uno::Any aPState = m_xShapeAgg->queryAggregation(rPStateType);
auto xShapePrState = o3tl::tryAccess<uno::Reference<XPropertyState>>( auto xShapePrState = o3tl::tryAccess<uno::Reference<XPropertyState>>(
aPState); aPState);
if(!xShapePrState) if(!xShapePrState)
@@ -1963,12 +1963,12 @@ void SwXShape::addPropertyChangeListener(
const OUString& _propertyName, const OUString& _propertyName,
const uno::Reference< beans::XPropertyChangeListener > & _listener ) const uno::Reference< beans::XPropertyChangeListener > & _listener )
{ {
if ( !xShapeAgg.is() ) if ( !m_xShapeAgg.is() )
throw uno::RuntimeException("no shape aggregate", *this ); throw uno::RuntimeException("no shape aggregate", *this );
// must be handled by the aggregate // must be handled by the aggregate
uno::Reference< beans::XPropertySet > xShapeProps; uno::Reference< beans::XPropertySet > xShapeProps;
if ( xShapeAgg->queryAggregation( cppu::UnoType<beans::XPropertySet>::get() ) >>= xShapeProps ) if ( m_xShapeAgg->queryAggregation( cppu::UnoType<beans::XPropertySet>::get() ) >>= xShapeProps )
xShapeProps->addPropertyChangeListener( _propertyName, _listener ); xShapeProps->addPropertyChangeListener( _propertyName, _listener );
} }
@@ -1976,12 +1976,12 @@ void SwXShape::removePropertyChangeListener(
const OUString& _propertyName, const OUString& _propertyName,
const uno::Reference< beans::XPropertyChangeListener > & _listener) const uno::Reference< beans::XPropertyChangeListener > & _listener)
{ {
if ( !xShapeAgg.is() ) if ( !m_xShapeAgg.is() )
throw uno::RuntimeException("no shape aggregate", *this ); throw uno::RuntimeException("no shape aggregate", *this );
// must be handled by the aggregate // must be handled by the aggregate
uno::Reference< beans::XPropertySet > xShapeProps; uno::Reference< beans::XPropertySet > xShapeProps;
if ( xShapeAgg->queryAggregation( cppu::UnoType<beans::XPropertySet>::get() ) >>= xShapeProps ) if ( m_xShapeAgg->queryAggregation( cppu::UnoType<beans::XPropertySet>::get() ) >>= xShapeProps )
xShapeProps->removePropertyChangeListener( _propertyName, _listener ); xShapeProps->removePropertyChangeListener( _propertyName, _listener );
} }
@@ -2095,7 +2095,7 @@ uno::Reference< text::XTextRange > SwXShape::getAnchor()
} }
} }
else else
aRef = pImpl->GetTextRange(); aRef = m_pImpl->GetTextRange();
return aRef; return aRef;
} }
@@ -2137,9 +2137,9 @@ void SwXShape::dispose()
pFormat->GetDoc()->getIDocumentLayoutAccess().DelLayoutFormat( pFormat ); pFormat->GetDoc()->getIDocumentLayoutAccess().DelLayoutFormat( pFormat );
} }
} }
if(xShapeAgg.is()) if(m_xShapeAgg.is())
{ {
uno::Any aAgg(xShapeAgg->queryAggregation( cppu::UnoType<XComponent>::get())); uno::Any aAgg(m_xShapeAgg->queryAggregation( cppu::UnoType<XComponent>::get()));
uno::Reference<XComponent> xComp; uno::Reference<XComponent> xComp;
aAgg >>= xComp; aAgg >>= xComp;
if(xComp.is()) if(xComp.is())
@@ -2187,8 +2187,8 @@ uno::Sequence< OUString > SwXShape::getSupportedServiceNames()
SvxShape* SwXShape::GetSvxShape() SvxShape* SwXShape::GetSvxShape()
{ {
if(xShapeAgg.is()) if(m_xShapeAgg.is())
return comphelper::getUnoTunnelImplementation<SvxShape>(xShapeAgg); return comphelper::getUnoTunnelImplementation<SvxShape>(m_xShapeAgg);
return nullptr; return nullptr;
} }
@@ -2688,7 +2688,7 @@ SwXGroupShape::SwXGroupShape(uno::Reference<XInterface> & xShape,
: SwXShape(xShape, pDoc) : SwXShape(xShape, pDoc)
{ {
#if OSL_DEBUG_LEVEL > 0 #if OSL_DEBUG_LEVEL > 0
uno::Reference<XShapes> xShapes(xShapeAgg, uno::UNO_QUERY); uno::Reference<XShapes> xShapes(m_xShapeAgg, uno::UNO_QUERY);
OSL_ENSURE(xShapes.is(), "no SvxShape found or shape is not a group shape"); OSL_ENSURE(xShapes.is(), "no SvxShape found or shape is not a group shape");
#endif #endif
} }
@@ -2726,10 +2726,10 @@ void SwXGroupShape::add( const uno::Reference< XShape >& xShape )
throw uno::RuntimeException(); throw uno::RuntimeException();
uno::Reference<XShapes> xShapes; uno::Reference<XShapes> xShapes;
if( xShapeAgg.is() ) if( m_xShapeAgg.is() )
{ {
const uno::Type& rType = cppu::UnoType<XShapes>::get(); const uno::Type& rType = cppu::UnoType<XShapes>::get();
uno::Any aAgg = xShapeAgg->queryAggregation( rType ); uno::Any aAgg = m_xShapeAgg->queryAggregation( rType );
aAgg >>= xShapes; aAgg >>= xShapes;
} }
if(!xShapes.is()) if(!xShapes.is())
@@ -2758,7 +2758,7 @@ void SwXGroupShape::add( const uno::Reference< XShape >& xShape )
// object to corresponding invisible layer. // object to corresponding invisible layer.
if( SdrInventor::FmForm != pObj->GetObjInventor()) if( SdrInventor::FmForm != pObj->GetObjInventor())
{ {
pObj->SetLayer( pSwShape->pImpl->GetOpaque() pObj->SetLayer( pSwShape->m_pImpl->GetOpaque()
? pDoc->getIDocumentDrawModelAccess().GetInvisibleHeavenId() ? pDoc->getIDocumentDrawModelAccess().GetInvisibleHeavenId()
: pDoc->getIDocumentDrawModelAccess().GetInvisibleHellId() ); : pDoc->getIDocumentDrawModelAccess().GetInvisibleHellId() );
} }
@@ -2781,10 +2781,10 @@ void SwXGroupShape::remove( const uno::Reference< XShape >& xShape )
{ {
SolarMutexGuard aGuard; SolarMutexGuard aGuard;
uno::Reference<XShapes> xShapes; uno::Reference<XShapes> xShapes;
if( xShapeAgg.is() ) if( m_xShapeAgg.is() )
{ {
const uno::Type& rType = cppu::UnoType<XShapes>::get(); const uno::Type& rType = cppu::UnoType<XShapes>::get();
uno::Any aAgg = xShapeAgg->queryAggregation( rType ); uno::Any aAgg = m_xShapeAgg->queryAggregation( rType );
aAgg >>= xShapes; aAgg >>= xShapes;
} }
if(!xShapes.is()) if(!xShapes.is())
@@ -2796,10 +2796,10 @@ sal_Int32 SwXGroupShape::getCount()
{ {
SolarMutexGuard aGuard; SolarMutexGuard aGuard;
uno::Reference<XIndexAccess> xAcc; uno::Reference<XIndexAccess> xAcc;
if( xShapeAgg.is() ) if( m_xShapeAgg.is() )
{ {
const uno::Type& rType = cppu::UnoType<XIndexAccess>::get(); const uno::Type& rType = cppu::UnoType<XIndexAccess>::get();
uno::Any aAgg = xShapeAgg->queryAggregation( rType ); uno::Any aAgg = m_xShapeAgg->queryAggregation( rType );
aAgg >>= xAcc; aAgg >>= xAcc;
} }
if(!xAcc.is()) if(!xAcc.is())
@@ -2811,10 +2811,10 @@ uno::Any SwXGroupShape::getByIndex(sal_Int32 nIndex)
{ {
SolarMutexGuard aGuard; SolarMutexGuard aGuard;
uno::Reference<XIndexAccess> xAcc; uno::Reference<XIndexAccess> xAcc;
if( xShapeAgg.is() ) if( m_xShapeAgg.is() )
{ {
const uno::Type& rType = cppu::UnoType<XIndexAccess>::get(); const uno::Type& rType = cppu::UnoType<XIndexAccess>::get();
uno::Any aAgg = xShapeAgg->queryAggregation( rType ); uno::Any aAgg = m_xShapeAgg->queryAggregation( rType );
aAgg >>= xAcc; aAgg >>= xAcc;
} }
if(!xAcc.is()) if(!xAcc.is())
@@ -2826,10 +2826,10 @@ uno::Type SwXGroupShape::getElementType( )
{ {
SolarMutexGuard aGuard; SolarMutexGuard aGuard;
uno::Reference<XIndexAccess> xAcc; uno::Reference<XIndexAccess> xAcc;
if( xShapeAgg.is() ) if( m_xShapeAgg.is() )
{ {
const uno::Type& rType = cppu::UnoType<XIndexAccess>::get(); const uno::Type& rType = cppu::UnoType<XIndexAccess>::get();
uno::Any aAgg = xShapeAgg->queryAggregation( rType ); uno::Any aAgg = m_xShapeAgg->queryAggregation( rType );
aAgg >>= xAcc; aAgg >>= xAcc;
} }
if(!xAcc.is()) if(!xAcc.is())
@@ -2841,10 +2841,10 @@ sal_Bool SwXGroupShape::hasElements( )
{ {
SolarMutexGuard aGuard; SolarMutexGuard aGuard;
uno::Reference<XIndexAccess> xAcc; uno::Reference<XIndexAccess> xAcc;
if( xShapeAgg.is() ) if( m_xShapeAgg.is() )
{ {
const uno::Type& rType = cppu::UnoType<XIndexAccess>::get(); const uno::Type& rType = cppu::UnoType<XIndexAccess>::get();
uno::Any aAgg = xShapeAgg->queryAggregation( rType ); uno::Any aAgg = m_xShapeAgg->queryAggregation( rType );
aAgg >>= xAcc; aAgg >>= xAcc;
} }
if(!xAcc.is()) if(!xAcc.is())