[Libreoffice-commits] core.git: sw/inc sw/source
Miklos Vajna (via logerrit)
logerrit at kemper.freedesktop.org
Mon Jan 6 08:19:20 UTC 2020
sw/inc/unochart.hxx | 10 ++--
sw/source/core/doc/docdraw.cxx | 10 ++--
sw/source/core/doc/swserv.cxx | 20 ++++-----
sw/source/core/inc/mvsave.hxx | 22 +++++-----
sw/source/core/unocore/unochart.cxx | 76 ++++++++++++++++++------------------
5 files changed, 69 insertions(+), 69 deletions(-)
New commits:
commit 53bda3f58162072e50cffc11279639c986065da0
Author: Miklos Vajna <vmiklos at collabora.com>
AuthorDate: Mon Jan 6 08:32:46 2020 +0100
Commit: Miklos Vajna <vmiklos at collabora.com>
CommitDate: Mon Jan 6 09:18:48 2020 +0100
sw: prefix members of SwChartDataProvider, SwChartDataSource, ...
... SwDataChanged and ZSortFly
See tdf#94879 for motivation.
Change-Id: I072f14d52f67ec05e068dda4ea0b8e5145143792
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86255
Reviewed-by: Miklos Vajna <vmiklos at collabora.com>
Tested-by: Jenkins
diff --git a/sw/inc/unochart.hxx b/sw/inc/unochart.hxx
index 4790ddc8e25b..d52b5ebf7730 100644
--- a/sw/inc/unochart.hxx
+++ b/sw/inc/unochart.hxx
@@ -123,11 +123,11 @@ class SwChartDataProvider final :
// data-source) by this object. Since there is only one object of this type
// for each document it should hold references to all used data-sequences for
// all tables of the document.
- mutable Map_Set_DataSequenceRef_t aDataSequences;
+ mutable Map_Set_DataSequenceRef_t m_aDataSequences;
- ::comphelper::OInterfaceContainerHelper2 aEvtListeners;
- const SwDoc * pDoc;
- bool bDisposed;
+ ::comphelper::OInterfaceContainerHelper2 m_aEventListeners;
+ const SwDoc * m_pDoc;
+ bool m_bDisposed;
SwChartDataProvider( const SwChartDataProvider & ) = delete;
SwChartDataProvider & operator = ( const SwChartDataProvider & ) = delete;
@@ -194,7 +194,7 @@ class SwChartDataSource final :
public SwChartDataSourceBaseClass
{
css::uno::Sequence<
- css::uno::Reference< css::chart2::data::XLabeledDataSequence > > aLDS;
+ css::uno::Reference< css::chart2::data::XLabeledDataSequence > > m_aLDS;
SwChartDataSource( const SwChartDataSource & ) = delete;
SwChartDataSource & operator = ( const SwChartDataSource & ) = delete;
diff --git a/sw/source/core/doc/docdraw.cxx b/sw/source/core/doc/docdraw.cxx
index 94b71b2d998c..47a217269d45 100644
--- a/sw/source/core/doc/docdraw.cxx
+++ b/sw/source/core/doc/docdraw.cxx
@@ -462,12 +462,12 @@ bool SwDoc::DeleteSelection( SwDrawView& rDrawView )
}
ZSortFly::ZSortFly(const SwFrameFormat* pFrameFormat, const SwFormatAnchor* pFlyAn, sal_uInt32 nArrOrdNum)
- : pFormat(pFrameFormat)
- , pAnchor(pFlyAn)
- , nOrdNum(nArrOrdNum)
+ : m_pFormat(pFrameFormat)
+ , m_pAnchor(pFlyAn)
+ , m_nOrdNum(nArrOrdNum)
{
- SAL_WARN_IF(pFormat->Which() != RES_FLYFRMFMT && pFormat->Which() != RES_DRAWFRMFMT, "sw.core", "What kind of format is this?");
- pFormat->CallSwClientNotify(sw::GetZOrderHint(nOrdNum));
+ SAL_WARN_IF(m_pFormat->Which() != RES_FLYFRMFMT && m_pFormat->Which() != RES_DRAWFRMFMT, "sw.core", "What kind of format is this?");
+ m_pFormat->CallSwClientNotify(sw::GetZOrderHint(m_nOrdNum));
}
/// In the Outliner, set a link to the method for field display in edit objects.
diff --git a/sw/source/core/doc/swserv.cxx b/sw/source/core/doc/swserv.cxx
index 476c03dc85b0..bae7ae799856 100644
--- a/sw/source/core/doc/swserv.cxx
+++ b/sw/source/core/doc/swserv.cxx
@@ -275,23 +275,23 @@ void SwServerObject::SetDdeBookmark( ::sw::mark::IMark& rBookmark)
}
SwDataChanged::SwDataChanged( const SwPaM& rPam )
- : pPam( &rPam ), pPos( nullptr ), pDoc( rPam.GetDoc() )
+ : m_pPam( &rPam ), m_pPos( nullptr ), m_pDoc( rPam.GetDoc() )
{
- nContent = rPam.GetPoint()->nContent.GetIndex();
+ m_nContent = rPam.GetPoint()->nContent.GetIndex();
}
SwDataChanged::SwDataChanged( SwDoc* pDc, const SwPosition& rPos )
- : pPam( nullptr ), pPos( &rPos ), pDoc( pDc )
+ : m_pPam( nullptr ), m_pPos( &rPos ), m_pDoc( pDc )
{
- nContent = rPos.nContent.GetIndex();
+ m_nContent = rPos.nContent.GetIndex();
}
SwDataChanged::~SwDataChanged()
{
// JP 09.04.96: Only if the Layout is available (thus during input)
- if( pDoc->getIDocumentLayoutAccess().GetCurrentViewShell() )
+ if( m_pDoc->getIDocumentLayoutAccess().GetCurrentViewShell() )
{
- const ::sfx2::SvLinkSources& rServers = pDoc->getIDocumentLinksAdministration().GetLinkManager().GetServers();
+ const ::sfx2::SvLinkSources& rServers = m_pDoc->getIDocumentLinksAdministration().GetLinkManager().GetServers();
::sfx2::SvLinkSources aTemp(rServers);
for( const auto& rpLinkSrc : aTemp )
@@ -301,17 +301,17 @@ SwDataChanged::~SwDataChanged()
if( refObj->HasDataLinks() && dynamic_cast<const SwServerObject*>( refObj.get() ) != nullptr)
{
SwServerObject& rObj = *static_cast<SwServerObject*>( refObj.get() );
- if( pPos )
- rObj.SendDataChanged( *pPos );
+ if( m_pPos )
+ rObj.SendDataChanged( *m_pPos );
else
- rObj.SendDataChanged( *pPam );
+ rObj.SendDataChanged( *m_pPam );
}
// We shouldn't have a connection anymore
if( !refObj->HasDataLinks() )
{
// Then remove from the list
- pDoc->getIDocumentLinksAdministration().GetLinkManager().RemoveServer( rpLinkSrc );
+ m_pDoc->getIDocumentLinksAdministration().GetLinkManager().RemoveServer( rpLinkSrc );
}
}
}
diff --git a/sw/source/core/inc/mvsave.hxx b/sw/source/core/inc/mvsave.hxx
index b44bd555256f..a509ea02b3a1 100644
--- a/sw/source/core/inc/mvsave.hxx
+++ b/sw/source/core/inc/mvsave.hxx
@@ -126,17 +126,17 @@ void DelFlyInRange( const SwNodeIndex& rMkNdIdx,
class SwDataChanged
{
- const SwPaM* pPam;
- const SwPosition* pPos;
- SwDoc* pDoc;
- sal_Int32 nContent;
+ const SwPaM* m_pPam;
+ const SwPosition* m_pPos;
+ SwDoc* m_pDoc;
+ sal_Int32 m_nContent;
public:
SwDataChanged( const SwPaM& rPam );
SwDataChanged( SwDoc* pDoc, const SwPosition& rPos );
~SwDataChanged();
- sal_Int32 GetContent() const { return nContent; }
+ sal_Int32 GetContent() const { return m_nContent; }
};
/**
@@ -158,9 +158,9 @@ void PaMCorrRel( const SwNodeIndex &rOldNode,
*/
class ZSortFly
{
- const SwFrameFormat* pFormat;
- const SwFormatAnchor* pAnchor;
- sal_uInt32 nOrdNum;
+ const SwFrameFormat* m_pFormat;
+ const SwFormatAnchor* m_pAnchor;
+ sal_uInt32 m_nOrdNum;
public:
ZSortFly( const SwFrameFormat* pFrameFormat, const SwFormatAnchor* pFlyAnchor,
@@ -168,10 +168,10 @@ public:
bool operator==( const ZSortFly& ) const { return false; }
bool operator<( const ZSortFly& rCmp ) const
- { return nOrdNum < rCmp.nOrdNum; }
+ { return m_nOrdNum < rCmp.m_nOrdNum; }
- const SwFrameFormat* GetFormat() const { return pFormat; }
- const SwFormatAnchor* GetAnchor() const { return pAnchor; }
+ const SwFrameFormat* GetFormat() const { return m_pFormat; }
+ const SwFormatAnchor* GetAnchor() const { return m_pAnchor; }
};
class SwTableNumFormatMerge
diff --git a/sw/source/core/unocore/unochart.cxx b/sw/source/core/unocore/unochart.cxx
index 66c5bffc0a30..ccc246ab8404 100644
--- a/sw/source/core/unocore/unochart.cxx
+++ b/sw/source/core/unocore/unochart.cxx
@@ -504,10 +504,10 @@ static void SortSubranges( uno::Sequence< OUString > &rSubRanges, bool bCmpByCol
}
SwChartDataProvider::SwChartDataProvider( const SwDoc* pSwDoc ) :
- aEvtListeners( GetChartMutex() ),
- pDoc( pSwDoc )
+ m_aEventListeners( GetChartMutex() ),
+ m_pDoc( pSwDoc )
{
- bDisposed = false;
+ m_bDisposed = false;
}
SwChartDataProvider::~SwChartDataProvider()
@@ -518,12 +518,12 @@ uno::Reference< chart2::data::XDataSource > SwChartDataProvider::Impl_createData
const uno::Sequence< beans::PropertyValue >& rArguments, bool bTestOnly )
{
SolarMutexGuard aGuard;
- if (bDisposed)
+ if (m_bDisposed)
throw lang::DisposedException();
uno::Reference< chart2::data::XDataSource > xRes;
- if (!pDoc)
+ if (!m_pDoc)
throw uno::RuntimeException("Not connected to a document.");
// get arguments
@@ -578,13 +578,13 @@ uno::Reference< chart2::data::XDataSource > SwChartDataProvider::Impl_createData
// get sub-ranges and check that they all are from the very same table
bool bOk = GetSubranges( aRangeRepresentation, aSubRanges, true );
- if (!bOk && pDoc && !aChartOleObjectName.isEmpty() )
+ if (!bOk && m_pDoc && !aChartOleObjectName.isEmpty() )
{
//try to correct the range here
//work around wrong writer ranges ( see Issue 58464 )
OUString aChartTableName;
- const SwNodes& rNodes = pDoc->GetNodes();
+ const SwNodes& rNodes = m_pDoc->GetNodes();
for( sal_uLong nN = rNodes.Count(); nN--; )
{
SwNodePtr pNode = rNodes[nN];
@@ -636,7 +636,7 @@ uno::Reference< chart2::data::XDataSource > SwChartDataProvider::Impl_createData
SwFrameFormat *pTableFormat = nullptr; // pointer to table format
std::shared_ptr<SwUnoCursor> pUnoCursor; // here required to check if the cells in the range do actually exist
if (aSubRanges.hasElements())
- GetFormatAndCreateCursorFromRangeRep( pDoc, aSubRanges[0], &pTableFormat, pUnoCursor );
+ GetFormatAndCreateCursorFromRangeRep( m_pDoc, aSubRanges[0], &pTableFormat, pUnoCursor );
if (!pTableFormat || !pUnoCursor)
throw lang::IllegalArgumentException();
@@ -840,8 +840,8 @@ uno::Reference< chart2::data::XDataSource > SwChartDataProvider::Impl_createData
// get cursors spanning the cell ranges for label and data
std::shared_ptr<SwUnoCursor> pLabelUnoCursor;
std::shared_ptr<SwUnoCursor> pDataUnoCursor;
- GetFormatAndCreateCursorFromRangeRep(pDoc, aLabelRange, &pTableFormat, pLabelUnoCursor);
- GetFormatAndCreateCursorFromRangeRep(pDoc, aDataRange, &pTableFormat, pDataUnoCursor);
+ GetFormatAndCreateCursorFromRangeRep(m_pDoc, aLabelRange, &pTableFormat, pLabelUnoCursor);
+ GetFormatAndCreateCursorFromRangeRep(m_pDoc, aDataRange, &pTableFormat, pDataUnoCursor);
// create XDataSequence's from cursors
if (pLabelUnoCursor)
@@ -962,7 +962,7 @@ uno::Sequence< beans::PropertyValue > SAL_CALL SwChartDataProvider::detectArgume
const uno::Reference< chart2::data::XDataSource >& xDataSource )
{
SolarMutexGuard aGuard;
- if (bDisposed)
+ if (m_bDisposed)
throw lang::DisposedException();
uno::Sequence< beans::PropertyValue > aResult;
@@ -1098,7 +1098,7 @@ uno::Sequence< beans::PropertyValue > SAL_CALL SwChartDataProvider::detectArgume
// build data used to determine 'CellRangeRepresentation' later on
- GetTableByName( *pDoc, aTableName, &pTableFormat, &pTable );
+ GetTableByName( *m_pDoc, aTableName, &pTableFormat, &pTable );
if (!pTable || pTable->IsTableComplex())
return aResult; // failed -> return empty property sequence
nTableRows = pTable->GetTabLines().size();
@@ -1293,12 +1293,12 @@ uno::Sequence< beans::PropertyValue > SAL_CALL SwChartDataProvider::detectArgume
uno::Reference< chart2::data::XDataSequence > SwChartDataProvider::Impl_createDataSequenceByRangeRepresentation(
const OUString& rRangeRepresentation, bool bTestOnly )
{
- if (bDisposed)
+ if (m_bDisposed)
throw lang::DisposedException();
SwFrameFormat *pTableFormat = nullptr; // pointer to table format
std::shared_ptr<SwUnoCursor> pUnoCursor; // pointer to new created cursor spanning the cell range
- GetFormatAndCreateCursorFromRangeRep( pDoc, rRangeRepresentation,
+ GetFormatAndCreateCursorFromRangeRep( m_pDoc, rRangeRepresentation,
&pTableFormat, pUnoCursor );
if (!pTableFormat || !pUnoCursor)
throw lang::IllegalArgumentException();
@@ -1361,23 +1361,23 @@ void SAL_CALL SwChartDataProvider::dispose( )
bool bMustDispose( false );
{
osl::MutexGuard aGuard( GetChartMutex() );
- bMustDispose = !bDisposed;
- if (!bDisposed)
- bDisposed = true;
+ bMustDispose = !m_bDisposed;
+ if (!m_bDisposed)
+ m_bDisposed = true;
}
if (bMustDispose)
{
// dispose all data-sequences
- for (const auto& rEntry : aDataSequences)
+ for (const auto& rEntry : m_aDataSequences)
{
DisposeAllDataSequences( rEntry.first );
}
// release all references to data-sequences
- aDataSequences.clear();
+ m_aDataSequences.clear();
// require listeners to release references to this object
lang::EventObject aEvtObj( dynamic_cast< chart2::data::XDataProvider * >(this) );
- aEvtListeners.disposeAndClear( aEvtObj );
+ m_aEventListeners.disposeAndClear( aEvtObj );
}
}
@@ -1385,16 +1385,16 @@ void SAL_CALL SwChartDataProvider::addEventListener(
const uno::Reference< lang::XEventListener >& rxListener )
{
osl::MutexGuard aGuard( GetChartMutex() );
- if (!bDisposed && rxListener.is())
- aEvtListeners.addInterface( rxListener );
+ if (!m_bDisposed && rxListener.is())
+ m_aEventListeners.addInterface( rxListener );
}
void SAL_CALL SwChartDataProvider::removeEventListener(
const uno::Reference< lang::XEventListener >& rxListener )
{
osl::MutexGuard aGuard( GetChartMutex() );
- if (!bDisposed && rxListener.is())
- aEvtListeners.removeInterface( rxListener );
+ if (!m_bDisposed && rxListener.is())
+ m_aEventListeners.removeInterface( rxListener );
}
OUString SAL_CALL SwChartDataProvider::getImplementationName( )
@@ -1414,12 +1414,12 @@ uno::Sequence< OUString > SAL_CALL SwChartDataProvider::getSupportedServiceNames
void SwChartDataProvider::AddDataSequence( const SwTable &rTable, uno::Reference< chart2::data::XDataSequence > const &rxDataSequence )
{
- aDataSequences[ &rTable ].insert( rxDataSequence );
+ m_aDataSequences[ &rTable ].insert( rxDataSequence );
}
void SwChartDataProvider::RemoveDataSequence( const SwTable &rTable, uno::Reference< chart2::data::XDataSequence > const &rxDataSequence )
{
- aDataSequences[ &rTable ].erase( rxDataSequence );
+ m_aDataSequences[ &rTable ].erase( rxDataSequence );
}
void SwChartDataProvider::InvalidateTable( const SwTable *pTable )
@@ -1427,10 +1427,10 @@ void SwChartDataProvider::InvalidateTable( const SwTable *pTable )
OSL_ENSURE( pTable, "table pointer is NULL" );
if (pTable)
{
- if (!bDisposed)
+ if (!m_bDisposed)
pTable->GetFrameFormat()->GetDoc()->getIDocumentChartDataProviderAccess().GetChartControllerHelper().StartOrContinueLocking();
- const Set_DataSequenceRef_t &rSet = aDataSequences[ pTable ];
+ const Set_DataSequenceRef_t &rSet = m_aDataSequences[ pTable ];
for (const auto& rItem : rSet)
{
uno::Reference< chart2::data::XDataSequence > xTemp(rItem); // temporary needed for g++ 3.3.5
@@ -1449,10 +1449,10 @@ void SwChartDataProvider::DeleteBox( const SwTable *pTable, const SwTableBox &rB
OSL_ENSURE( pTable, "table pointer is NULL" );
if (pTable)
{
- if (!bDisposed)
+ if (!m_bDisposed)
pTable->GetFrameFormat()->GetDoc()->getIDocumentChartDataProviderAccess().GetChartControllerHelper().StartOrContinueLocking();
- Set_DataSequenceRef_t &rSet = aDataSequences[ pTable ];
+ Set_DataSequenceRef_t &rSet = m_aDataSequences[ pTable ];
// iterate over all data-sequences for that table...
Set_DataSequenceRef_t::iterator aIt( rSet.begin() );
@@ -1503,14 +1503,14 @@ void SwChartDataProvider::DisposeAllDataSequences( const SwTable *pTable )
OSL_ENSURE( pTable, "table pointer is NULL" );
if (pTable)
{
- if (!bDisposed)
+ if (!m_bDisposed)
pTable->GetFrameFormat()->GetDoc()->getIDocumentChartDataProviderAccess().GetChartControllerHelper().StartOrContinueLocking();
//! make a copy of the STL container!
//! This is necessary since calling 'dispose' will implicitly remove an element
//! of the original container, and thus any iterator in the original container
//! would become invalid.
- const Set_DataSequenceRef_t aSet( aDataSequences[ pTable ] );
+ const Set_DataSequenceRef_t aSet( m_aDataSequences[ pTable ] );
for (const auto& rItem : aSet)
{
@@ -1582,7 +1582,7 @@ void SwChartDataProvider::AddRowCols(
}
// iterate over all data-sequences for the table
- const Set_DataSequenceRef_t &rSet = aDataSequences[ &rTable ];
+ const Set_DataSequenceRef_t &rSet = m_aDataSequences[ &rTable ];
for (const auto& rItem : rSet)
{
uno::Reference< chart2::data::XDataSequence > xTemp(rItem); // temporary needed for g++ 3.3.5
@@ -1624,7 +1624,7 @@ void SwChartDataProvider::AddRowCols(
OUString SAL_CALL SwChartDataProvider::convertRangeToXML( const OUString& rRangeRepresentation )
{
SolarMutexGuard aGuard;
- if (bDisposed)
+ if (m_bDisposed)
throw lang::DisposedException();
if (rRangeRepresentation.isEmpty())
@@ -1640,7 +1640,7 @@ OUString SAL_CALL SwChartDataProvider::convertRangeToXML( const OUString& rRange
const OUString aRange( rRangeRepresentation.getToken(0, ';', nPos) );
SwFrameFormat *pTableFormat = nullptr; // pointer to table format
std::shared_ptr<SwUnoCursor> pCursor;
- GetFormatAndCreateCursorFromRangeRep( pDoc, aRange, &pTableFormat, pCursor );
+ GetFormatAndCreateCursorFromRangeRep( m_pDoc, aRange, &pTableFormat, pCursor );
if (!pTableFormat)
throw lang::IllegalArgumentException();
SwTable* pTable = SwTable::FindTable( pTableFormat );
@@ -1694,7 +1694,7 @@ OUString SAL_CALL SwChartDataProvider::convertRangeToXML( const OUString& rRange
OUString SAL_CALL SwChartDataProvider::convertRangeFromXML( const OUString& rXMLRange )
{
SolarMutexGuard aGuard;
- if (bDisposed)
+ if (m_bDisposed)
throw lang::DisposedException();
if (rXMLRange.isEmpty())
@@ -1741,7 +1741,7 @@ OUString SAL_CALL SwChartDataProvider::convertRangeFromXML( const OUString& rXML
SwChartDataSource::SwChartDataSource(
const uno::Sequence< uno::Reference< chart2::data::XLabeledDataSequence > > &rLDS ) :
- aLDS( rLDS )
+ m_aLDS( rLDS )
{
}
@@ -1752,7 +1752,7 @@ SwChartDataSource::~SwChartDataSource()
uno::Sequence< uno::Reference< chart2::data::XLabeledDataSequence > > SAL_CALL SwChartDataSource::getDataSequences( )
{
SolarMutexGuard aGuard;
- return aLDS;
+ return m_aLDS;
}
OUString SAL_CALL SwChartDataSource::getImplementationName( )
More information about the Libreoffice-commits
mailing list