summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.com>2020-10-12 09:02:47 +0200
committerMiklos Vajna <vmiklos@collabora.com>2020-10-12 10:08:49 +0200
commit1ff072e3b672d864f119efdeba93248f47042ad1 (patch)
treeb4389cd529da66b6169ab21f1f2a1bcfc5fc6197
parent47da5a7e95ef45efcc9e13f225273e728d1fbc58 (diff)
sw: prefix members of SwFormatAnchor, SwXDocumentPropertyHelper, ...
... SwXLinkNameAccessWrapper and TableHeadingCheck See tdf#94879 for motivation. Change-Id: I1108abc0d4ee6179c0b4d4dbe18af0730edbd2ba Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104200 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
-rw-r--r--sw/inc/fmtanchr.hxx2
-rw-r--r--sw/inc/unotxdoc.hxx24
-rw-r--r--sw/source/core/access/AccessibilityCheck.cxx8
-rw-r--r--sw/source/core/layout/atrfrm.cxx10
-rw-r--r--sw/source/uibase/uno/unotxdoc.cxx122
5 files changed, 83 insertions, 83 deletions
diff --git a/sw/inc/fmtanchr.hxx b/sw/inc/fmtanchr.hxx
index d04b2afcd488..59c165cab701 100644
--- a/sw/inc/fmtanchr.hxx
+++ b/sw/inc/fmtanchr.hxx
@@ -41,7 +41,7 @@ class SW_DLLPUBLIC SwFormatAnchor: public SfxPoolItem
/// #i28701# - getting anchor positions ordered
sal_uInt32 m_nOrder;
- static sal_uInt32 m_nOrderCounter;
+ static sal_uInt32 s_nOrderCounter;
public:
SwFormatAnchor( RndStdIds eRnd = RndStdIds::FLY_AT_PAGE, sal_uInt16 nPageNum = 0 );
diff --git a/sw/inc/unotxdoc.hxx b/sw/inc/unotxdoc.hxx
index cf950c259c22..4ecd5ba57f7e 100644
--- a/sw/inc/unotxdoc.hxx
+++ b/sw/inc/unotxdoc.hxx
@@ -510,11 +510,11 @@ class SwXLinkNameAccessWrapper final : public cppu::WeakImplHelper
css::document::XLinkTargetSupplier
>
{
- css::uno::Reference< css::container::XNameAccess > xRealAccess;
- const SfxItemPropertySet* pPropSet;
- const OUString sLinkSuffix;
- const OUString sLinkDisplayName;
- SwXTextDocument* pxDoc;
+ css::uno::Reference< css::container::XNameAccess > m_xRealAccess;
+ const SfxItemPropertySet* m_pPropSet;
+ const OUString m_sLinkSuffix;
+ const OUString m_sLinkDisplayName;
+ SwXTextDocument* m_pxDoc;
public:
SwXLinkNameAccessWrapper(css::uno::Reference< css::container::XNameAccess > const & xAccess,
@@ -585,13 +585,13 @@ enum class SwCreateDrawTable {
class SwXDocumentPropertyHelper : public SvxUnoForbiddenCharsTable
{
- css::uno::Reference < css::uno::XInterface > xDashTable;
- css::uno::Reference < css::uno::XInterface > xGradientTable;
- css::uno::Reference < css::uno::XInterface > xHatchTable;
- css::uno::Reference < css::uno::XInterface > xBitmapTable;
- css::uno::Reference < css::uno::XInterface > xTransGradientTable;
- css::uno::Reference < css::uno::XInterface > xMarkerTable;
- css::uno::Reference < css::uno::XInterface > xDrawDefaults;
+ css::uno::Reference < css::uno::XInterface > m_xDashTable;
+ css::uno::Reference < css::uno::XInterface > m_xGradientTable;
+ css::uno::Reference < css::uno::XInterface > m_xHatchTable;
+ css::uno::Reference < css::uno::XInterface > m_xBitmapTable;
+ css::uno::Reference < css::uno::XInterface > m_xTransGradientTable;
+ css::uno::Reference < css::uno::XInterface > m_xMarkerTable;
+ css::uno::Reference < css::uno::XInterface > m_xDrawDefaults;
SwDoc* m_pDoc;
public:
diff --git a/sw/source/core/access/AccessibilityCheck.cxx b/sw/source/core/access/AccessibilityCheck.cxx
index e3699d9038b0..08e8f1d47051 100644
--- a/sw/source/core/access/AccessibilityCheck.cxx
+++ b/sw/source/core/access/AccessibilityCheck.cxx
@@ -697,18 +697,18 @@ class TableHeadingCheck : public NodeCheck
{
private:
// Boolean indicating if heading-in-table warning is already triggered.
- bool bPrevPassed;
+ bool m_bPrevPassed;
public:
TableHeadingCheck(sfx::AccessibilityIssueCollection& rIssueCollection)
: NodeCheck(rIssueCollection)
- , bPrevPassed(true)
+ , m_bPrevPassed(true)
{
}
void check(SwNode* pCurrent) override
{
- if (!bPrevPassed)
+ if (!m_bPrevPassed)
return;
const SwTextNode* textNode = pCurrent->GetTextNode();
@@ -719,7 +719,7 @@ public:
if (parentTable)
{
- bPrevPassed = false;
+ m_bPrevPassed = false;
lclAddIssue(m_rIssueCollection, SwResId(STR_HEADING_IN_TABLE));
}
}
diff --git a/sw/source/core/layout/atrfrm.cxx b/sw/source/core/layout/atrfrm.cxx
index 6202099748fc..b7dddc1a2466 100644
--- a/sw/source/core/layout/atrfrm.cxx
+++ b/sw/source/core/layout/atrfrm.cxx
@@ -1495,7 +1495,7 @@ SwFormatAnchor::SwFormatAnchor( RndStdIds nRnd, sal_uInt16 nPage )
m_eAnchorId( nRnd ),
m_nPageNumber( nPage ),
// OD 2004-05-05 #i28701# - get always new increased order number
- m_nOrder( ++m_nOrderCounter )
+ m_nOrder( ++s_nOrderCounter )
{}
SwFormatAnchor::SwFormatAnchor( const SwFormatAnchor &rCpy )
@@ -1505,7 +1505,7 @@ SwFormatAnchor::SwFormatAnchor( const SwFormatAnchor &rCpy )
, m_eAnchorId( rCpy.GetAnchorId() )
, m_nPageNumber( rCpy.GetPageNum() )
// OD 2004-05-05 #i28701# - get always new increased order number
- , m_nOrder( ++m_nOrderCounter )
+ , m_nOrder( ++s_nOrderCounter )
{
}
@@ -1538,7 +1538,7 @@ SwFormatAnchor& SwFormatAnchor::operator=(const SwFormatAnchor& rAnchor)
m_eAnchorId = rAnchor.GetAnchorId();
m_nPageNumber = rAnchor.GetPageNum();
// OD 2004-05-05 #i28701# - get always new increased order number
- m_nOrder = ++m_nOrderCounter;
+ m_nOrder = ++s_nOrderCounter;
m_pContentAnchor.reset( (rAnchor.GetContentAnchor())
? new SwPosition(*(rAnchor.GetContentAnchor()))
@@ -1567,7 +1567,7 @@ SwFormatAnchor* SwFormatAnchor::Clone( SfxItemPool* ) const
}
// OD 2004-05-05 #i28701#
-sal_uInt32 SwFormatAnchor::m_nOrderCounter = 0;
+sal_uInt32 SwFormatAnchor::s_nOrderCounter = 0;
// OD 2004-05-05 #i28701#
@@ -1709,7 +1709,7 @@ void SwFormatAnchor::dumpAsXml(xmlTextWriterPtr pWriter) const
xmlTextWriterWriteAttribute(pWriter, BAD_CAST("m_eAnchorType"), BAD_CAST(OString::number(static_cast<int>(m_eAnchorId)).getStr()));
xmlTextWriterWriteAttribute(pWriter, BAD_CAST("m_nPageNumber"), BAD_CAST(OString::number(m_nPageNumber).getStr()));
xmlTextWriterWriteAttribute(pWriter, BAD_CAST("m_nOrder"), BAD_CAST(OString::number(m_nOrder).getStr()));
- xmlTextWriterWriteAttribute(pWriter, BAD_CAST("m_nOrderCounter"), BAD_CAST(OString::number(m_nOrderCounter).getStr()));
+ xmlTextWriterWriteAttribute(pWriter, BAD_CAST("s_nOrderCounter"), BAD_CAST(OString::number(s_nOrderCounter).getStr()));
OUString aPresentation;
IntlWrapper aIntlWrapper(SvtSysLocale().GetUILanguageTag());
GetPresentation(SfxItemPresentation::Nameless, MapUnit::Map100thMM, MapUnit::Map100thMM, aPresentation, aIntlWrapper);
diff --git a/sw/source/uibase/uno/unotxdoc.cxx b/sw/source/uibase/uno/unotxdoc.cxx
index 31f7cf31c68a..08760267ee58 100644
--- a/sw/source/uibase/uno/unotxdoc.cxx
+++ b/sw/source/uibase/uno/unotxdoc.cxx
@@ -3985,20 +3985,20 @@ Sequence< OUString > SwXLinkTargetSupplier::getSupportedServiceNames()
SwXLinkNameAccessWrapper::SwXLinkNameAccessWrapper(
Reference< XNameAccess > const & xAccess, const OUString& rLinkDisplayName, const OUString& sSuffix ) :
- xRealAccess(xAccess),
- pPropSet(aSwMapProvider.GetPropertySet(PROPERTY_MAP_LINK_TARGET)),
- sLinkSuffix(sSuffix),
- sLinkDisplayName(rLinkDisplayName),
- pxDoc(nullptr)
+ m_xRealAccess(xAccess),
+ m_pPropSet(aSwMapProvider.GetPropertySet(PROPERTY_MAP_LINK_TARGET)),
+ m_sLinkSuffix(sSuffix),
+ m_sLinkDisplayName(rLinkDisplayName),
+ m_pxDoc(nullptr)
{
}
SwXLinkNameAccessWrapper::SwXLinkNameAccessWrapper(SwXTextDocument& rxDoc,
const OUString& rLinkDisplayName, const OUString& sSuffix) :
- pPropSet(aSwMapProvider.GetPropertySet(PROPERTY_MAP_LINK_TARGET)),
- sLinkSuffix(sSuffix),
- sLinkDisplayName(rLinkDisplayName),
- pxDoc(&rxDoc)
+ m_pPropSet(aSwMapProvider.GetPropertySet(PROPERTY_MAP_LINK_TARGET)),
+ m_sLinkSuffix(sSuffix),
+ m_sLinkDisplayName(rLinkDisplayName),
+ m_pxDoc(&rxDoc)
{
}
@@ -4012,19 +4012,19 @@ Any SwXLinkNameAccessWrapper::getByName(const OUString& rName)
bool bFound = false;
//cut link extension and call the real NameAccess
OUString sParam = rName;
- OUString sSuffix(sLinkSuffix);
+ OUString sSuffix(m_sLinkSuffix);
if(sParam.getLength() > sSuffix.getLength() )
{
OUString sCmp = sParam.copy(sParam.getLength() - sSuffix.getLength(),
sSuffix.getLength());
if(sCmp == sSuffix)
{
- if(pxDoc)
+ if(m_pxDoc)
{
sParam = sParam.copy(0, sParam.getLength() - sSuffix.getLength());
- if(!pxDoc->GetDocShell())
+ if(!m_pxDoc->GetDocShell())
throw RuntimeException("No document shell available");
- SwDoc* pDoc = pxDoc->GetDocShell()->GetDoc();
+ SwDoc* pDoc = m_pxDoc->GetDocShell()->GetDoc();
const size_t nOutlineCount = pDoc->GetNodes().GetOutLineNds().size();
for (size_t i = 0; i < nOutlineCount && !bFound; ++i)
@@ -4041,7 +4041,7 @@ Any SwXLinkNameAccessWrapper::getByName(const OUString& rName)
}
else
{
- aRet = xRealAccess->getByName(sParam.copy(0, sParam.getLength() - sSuffix.getLength()));
+ aRet = m_xRealAccess->getByName(sParam.copy(0, sParam.getLength() - sSuffix.getLength()));
Reference< XInterface > xInt;
if(!(aRet >>= xInt))
throw RuntimeException("Could not retrieve property");
@@ -4059,12 +4059,12 @@ Any SwXLinkNameAccessWrapper::getByName(const OUString& rName)
Sequence< OUString > SwXLinkNameAccessWrapper::getElementNames()
{
Sequence< OUString > aRet;
- if(pxDoc)
+ if(m_pxDoc)
{
- if(!pxDoc->GetDocShell())
+ if(!m_pxDoc->GetDocShell())
throw RuntimeException("No document shell available");
- SwDoc* pDoc = pxDoc->GetDocShell()->GetDoc();
+ SwDoc* pDoc = m_pxDoc->GetDocShell()->GetDoc();
const SwOutlineNodes& rOutlineNodes = pDoc->GetNodes().GetOutLineNds();
const size_t nOutlineCount = rOutlineNodes.size();
aRet.realloc(nOutlineCount);
@@ -4078,10 +4078,10 @@ Sequence< OUString > SwXLinkNameAccessWrapper::getElementNames()
}
else
{
- Sequence< OUString > aOrg = xRealAccess->getElementNames();
+ Sequence< OUString > aOrg = m_xRealAccess->getElementNames();
aRet.realloc(aOrg.getLength());
std::transform(aOrg.begin(), aOrg.end(), aRet.begin(),
- [this](const OUString& rOrg) -> OUString { return rOrg + sLinkSuffix; });
+ [this](const OUString& rOrg) -> OUString { return rOrg + m_sLinkSuffix; });
}
return aRet;
}
@@ -4090,18 +4090,18 @@ sal_Bool SwXLinkNameAccessWrapper::hasByName(const OUString& rName)
{
bool bRet = false;
OUString sParam(rName);
- if(sParam.getLength() > sLinkSuffix.getLength() )
+ if(sParam.getLength() > m_sLinkSuffix.getLength() )
{
- OUString sCmp = sParam.copy(sParam.getLength() - sLinkSuffix.getLength(),
- sLinkSuffix.getLength());
- if(sCmp == sLinkSuffix)
+ OUString sCmp = sParam.copy(sParam.getLength() - m_sLinkSuffix.getLength(),
+ m_sLinkSuffix.getLength());
+ if(sCmp == m_sLinkSuffix)
{
- sParam = sParam.copy(0, sParam.getLength() - sLinkSuffix.getLength());
- if(pxDoc)
+ sParam = sParam.copy(0, sParam.getLength() - m_sLinkSuffix.getLength());
+ if(m_pxDoc)
{
- if(!pxDoc->GetDocShell())
+ if(!m_pxDoc->GetDocShell())
throw RuntimeException("No document shell available");
- SwDoc* pDoc = pxDoc->GetDocShell()->GetDoc();
+ SwDoc* pDoc = m_pxDoc->GetDocShell()->GetDoc();
const size_t nOutlineCount = pDoc->GetNodes().GetOutLineNds().size();
for (size_t i = 0; i < nOutlineCount && !bRet; ++i)
@@ -4117,7 +4117,7 @@ sal_Bool SwXLinkNameAccessWrapper::hasByName(const OUString& rName)
}
else
{
- bRet = xRealAccess->hasByName(sParam);
+ bRet = m_xRealAccess->hasByName(sParam);
}
}
}
@@ -4132,20 +4132,20 @@ uno::Type SwXLinkNameAccessWrapper::getElementType()
sal_Bool SwXLinkNameAccessWrapper::hasElements()
{
bool bRet = false;
- if(pxDoc)
+ if(m_pxDoc)
{
OSL_FAIL("not implemented");
}
else
{
- bRet = xRealAccess->hasElements();
+ bRet = m_xRealAccess->hasElements();
}
return bRet;
}
Reference< XPropertySetInfo > SwXLinkNameAccessWrapper::getPropertySetInfo()
{
- static Reference< XPropertySetInfo > xRet = pPropSet->getPropertySetInfo();
+ static Reference< XPropertySetInfo > xRet = m_pPropSet->getPropertySetInfo();
return xRet;
}
@@ -4190,11 +4190,11 @@ Any SwXLinkNameAccessWrapper::getPropertyValue(const OUString& rPropertyName)
Any aRet;
if( rPropertyName == UNO_LINK_DISPLAY_NAME )
{
- aRet <<= sLinkDisplayName;
+ aRet <<= m_sLinkDisplayName;
}
else if( rPropertyName == UNO_LINK_DISPLAY_BITMAP )
{
- aRet = lcl_GetDisplayBitmap(sLinkSuffix);
+ aRet = lcl_GetDisplayBitmap(m_sLinkSuffix);
}
else
throw UnknownPropertyException(rPropertyName);
@@ -4325,39 +4325,39 @@ Reference<XInterface> SwXDocumentPropertyHelper::GetDrawTable(SwCreateDrawTable
// #i52858#
// assure that Draw model is created, if it doesn't exist.
case SwCreateDrawTable::Dash :
- if(!xDashTable.is())
- xDashTable = SvxUnoDashTable_createInstance( m_pDoc->getIDocumentDrawModelAccess().GetOrCreateDrawModel() );
- xRet = xDashTable;
+ if(!m_xDashTable.is())
+ m_xDashTable = SvxUnoDashTable_createInstance( m_pDoc->getIDocumentDrawModelAccess().GetOrCreateDrawModel() );
+ xRet = m_xDashTable;
break;
case SwCreateDrawTable::Gradient :
- if(!xGradientTable.is())
- xGradientTable = SvxUnoGradientTable_createInstance( m_pDoc->getIDocumentDrawModelAccess().GetOrCreateDrawModel() );
- xRet = xGradientTable;
+ if(!m_xGradientTable.is())
+ m_xGradientTable = SvxUnoGradientTable_createInstance( m_pDoc->getIDocumentDrawModelAccess().GetOrCreateDrawModel() );
+ xRet = m_xGradientTable;
break;
case SwCreateDrawTable::Hatch :
- if(!xHatchTable.is())
- xHatchTable = SvxUnoHatchTable_createInstance( m_pDoc->getIDocumentDrawModelAccess().GetOrCreateDrawModel() );
- xRet = xHatchTable;
+ if(!m_xHatchTable.is())
+ m_xHatchTable = SvxUnoHatchTable_createInstance( m_pDoc->getIDocumentDrawModelAccess().GetOrCreateDrawModel() );
+ xRet = m_xHatchTable;
break;
case SwCreateDrawTable::Bitmap :
- if(!xBitmapTable.is())
- xBitmapTable = SvxUnoBitmapTable_createInstance( m_pDoc->getIDocumentDrawModelAccess().GetOrCreateDrawModel() );
- xRet = xBitmapTable;
+ if(!m_xBitmapTable.is())
+ m_xBitmapTable = SvxUnoBitmapTable_createInstance( m_pDoc->getIDocumentDrawModelAccess().GetOrCreateDrawModel() );
+ xRet = m_xBitmapTable;
break;
case SwCreateDrawTable::TransGradient:
- if(!xTransGradientTable.is())
- xTransGradientTable = SvxUnoTransGradientTable_createInstance( m_pDoc->getIDocumentDrawModelAccess().GetOrCreateDrawModel() );
- xRet = xTransGradientTable;
+ if(!m_xTransGradientTable.is())
+ m_xTransGradientTable = SvxUnoTransGradientTable_createInstance( m_pDoc->getIDocumentDrawModelAccess().GetOrCreateDrawModel() );
+ xRet = m_xTransGradientTable;
break;
case SwCreateDrawTable::Marker :
- if(!xMarkerTable.is())
- xMarkerTable = SvxUnoMarkerTable_createInstance( m_pDoc->getIDocumentDrawModelAccess().GetOrCreateDrawModel() );
- xRet = xMarkerTable;
+ if(!m_xMarkerTable.is())
+ m_xMarkerTable = SvxUnoMarkerTable_createInstance( m_pDoc->getIDocumentDrawModelAccess().GetOrCreateDrawModel() );
+ xRet = m_xMarkerTable;
break;
case SwCreateDrawTable::Defaults:
- if(!xDrawDefaults.is())
- xDrawDefaults = static_cast<cppu::OWeakObject*>(new SwSvxUnoDrawPool(*m_pDoc));
- xRet = xDrawDefaults;
+ if(!m_xDrawDefaults.is())
+ m_xDrawDefaults = static_cast<cppu::OWeakObject*>(new SwSvxUnoDrawPool(*m_pDoc));
+ xRet = m_xDrawDefaults;
break;
#if OSL_DEBUG_LEVEL > 0
default: OSL_FAIL("which table?");
@@ -4369,13 +4369,13 @@ Reference<XInterface> SwXDocumentPropertyHelper::GetDrawTable(SwCreateDrawTable
void SwXDocumentPropertyHelper::Invalidate()
{
- xDashTable = nullptr;
- xGradientTable = nullptr;
- xHatchTable = nullptr;
- xBitmapTable = nullptr;
- xTransGradientTable = nullptr;
- xMarkerTable = nullptr;
- xDrawDefaults = nullptr;
+ m_xDashTable = nullptr;
+ m_xGradientTable = nullptr;
+ m_xHatchTable = nullptr;
+ m_xBitmapTable = nullptr;
+ m_xTransGradientTable = nullptr;
+ m_xMarkerTable = nullptr;
+ m_xDrawDefaults = nullptr;
m_pDoc = nullptr;
SvxUnoForbiddenCharsTable::mxForbiddenChars.reset();
}