summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sw/inc/flddat.hxx2
-rw-r--r--sw/source/core/fields/docufld.cxx4
-rw-r--r--sw/source/core/fields/flddat.cxx10
-rw-r--r--sw/source/core/unocore/unocoll.cxx16
-rw-r--r--sw/source/core/unocore/unoidx.cxx12
5 files changed, 22 insertions, 22 deletions
diff --git a/sw/inc/flddat.hxx b/sw/inc/flddat.hxx
index 66f13c98bf51..38c16c9039a3 100644
--- a/sw/inc/flddat.hxx
+++ b/sw/inc/flddat.hxx
@@ -68,7 +68,7 @@ public:
Date GetDate() const;
tools::Time GetTime() const;
void SetDateTime(const DateTime& rDT);
- static double GetDateTime(SwDoc* pDoc, const DateTime& rDT);
+ static double GetDateTime(SwDoc& rDoc, const DateTime& rDT);
virtual bool QueryValue( css::uno::Any& rVal, sal_uInt16 nMId ) const override;
virtual bool PutValue( const css::uno::Any& rVal, sal_uInt16 nMId ) override;
diff --git a/sw/source/core/fields/docufld.cxx b/sw/source/core/fields/docufld.cxx
index cca0e4ee8c7f..196dcba31d3b 100644
--- a/sw/source/core/fields/docufld.cxx
+++ b/sw/source/core/fields/docufld.cxx
@@ -952,7 +952,7 @@ OUString SwDocInfoFieldType::Expand( sal_uInt16 nSub, sal_uInt32 nFormat,
else
{
// start the number formatter
- double fVal = SwDateTimeField::GetDateTime( GetDoc(),
+ double fVal = SwDateTimeField::GetDateTime( *GetDoc(),
aDate);
aStr = ExpandValue(fVal, nFormat, nLang);
}
@@ -968,7 +968,7 @@ OUString SwDocInfoFieldType::Expand( sal_uInt16 nSub, sal_uInt32 nFormat,
else
{
// start the number formatter
- double fVal = SwDateTimeField::GetDateTime( GetDoc(),
+ double fVal = SwDateTimeField::GetDateTime( *GetDoc(),
aDate);
aStr = ExpandValue(fVal, nFormat, nLang);
}
diff --git a/sw/source/core/fields/flddat.cxx b/sw/source/core/fields/flddat.cxx
index f2a6a779a0ed..d68fe77beabe 100644
--- a/sw/source/core/fields/flddat.cxx
+++ b/sw/source/core/fields/flddat.cxx
@@ -67,7 +67,7 @@ OUString SwDateTimeField::ExpandImpl(SwRootFrame const*const) const
if (!(IsFixed()))
{
DateTime aDateTime( DateTime::SYSTEM );
- fVal = GetDateTime(GetDoc(), aDateTime);
+ fVal = GetDateTime(*GetDoc(), aDateTime);
}
else
fVal = GetValue();
@@ -115,12 +115,12 @@ OUString SwDateTimeField::GetPar2() const
void SwDateTimeField::SetDateTime(const DateTime& rDT)
{
- SetValue(GetDateTime(GetDoc(), rDT));
+ SetValue(GetDateTime(*GetDoc(), rDT));
}
-double SwDateTimeField::GetDateTime(SwDoc* pDoc, const DateTime& rDT)
+double SwDateTimeField::GetDateTime(SwDoc& rDoc, const DateTime& rDT)
{
- SvNumberFormatter* pFormatter = pDoc->GetNumberFormatter();
+ SvNumberFormatter* pFormatter = rDoc.GetNumberFormatter();
const Date& rNullDate = pFormatter->GetNullDate();
double fResult = rDT - DateTime(rNullDate);
@@ -133,7 +133,7 @@ double SwDateTimeField::GetValue() const
if (IsFixed())
return SwValueField::GetValue();
else
- return GetDateTime(GetDoc(), DateTime( DateTime::SYSTEM ));
+ return GetDateTime(*GetDoc(), DateTime( DateTime::SYSTEM ));
}
Date SwDateTimeField::GetDate() const
diff --git a/sw/source/core/unocore/unocoll.cxx b/sw/source/core/unocore/unocoll.cxx
index c9a2cdc0dff4..a6287cbd714d 100644
--- a/sw/source/core/unocore/unocoll.cxx
+++ b/sw/source/core/unocore/unocoll.cxx
@@ -1056,7 +1056,7 @@ namespace
protected:
virtual ~SwXFrameEnumeration() override {};
public:
- SwXFrameEnumeration(const SwDoc* const pDoc);
+ SwXFrameEnumeration(const SwDoc& rDoc);
//XEnumeration
virtual sal_Bool SAL_CALL hasMoreElements() override;
@@ -1070,12 +1070,12 @@ namespace
}
template<FlyCntType T>
-SwXFrameEnumeration<T>::SwXFrameEnumeration(const SwDoc* const pDoc)
+SwXFrameEnumeration<T>::SwXFrameEnumeration(const SwDoc& rDoc)
: m_aFrames()
{
SolarMutexGuard aGuard;
- const SwFrameFormats* const pFormats = pDoc->GetSpzFrameFormats();
- if(pFormats->empty())
+ const SwFrameFormats* const pFormats = rDoc.GetSpzFrameFormats();
+ if (pFormats->empty())
return;
// #i104937#
const size_t nSize = pFormats->size();
@@ -1090,7 +1090,7 @@ SwXFrameEnumeration<T>::SwXFrameEnumeration(const SwDoc* const pDoc)
const SwNodeIndex* pIdx = pFormat->GetContent().GetContentIdx();
if(!pIdx || !pIdx->GetNodes().IsDocNodes())
continue;
- const SwNode* pNd = pDoc->GetNodes()[ pIdx->GetIndex() + 1 ];
+ const SwNode* pNd = rDoc.GetNodes()[ pIdx->GetIndex() + 1 ];
if(UnoFrameWrap_traits<T>::filter(pNd))
m_aFrames.push_back(lcl_UnoWrapFrame<T>(pFormat));
}
@@ -1165,13 +1165,13 @@ uno::Reference<container::XEnumeration> SwXFrames::createEnumeration()
{
case FLYCNTTYPE_FRM:
return uno::Reference< container::XEnumeration >(
- new SwXFrameEnumeration<FLYCNTTYPE_FRM>(GetDoc()));
+ new SwXFrameEnumeration<FLYCNTTYPE_FRM>(*GetDoc()));
case FLYCNTTYPE_GRF:
return uno::Reference< container::XEnumeration >(
- new SwXFrameEnumeration<FLYCNTTYPE_GRF>(GetDoc()));
+ new SwXFrameEnumeration<FLYCNTTYPE_GRF>(*GetDoc()));
case FLYCNTTYPE_OLE:
return uno::Reference< container::XEnumeration >(
- new SwXFrameEnumeration<FLYCNTTYPE_OLE>(GetDoc()));
+ new SwXFrameEnumeration<FLYCNTTYPE_OLE>(*GetDoc()));
default:
throw uno::RuntimeException();
}
diff --git a/sw/source/core/unocore/unoidx.cxx b/sw/source/core/unocore/unoidx.cxx
index 9cfe87f04901..442527ef454b 100644
--- a/sw/source/core/unocore/unoidx.cxx
+++ b/sw/source/core/unocore/unoidx.cxx
@@ -98,13 +98,13 @@ static void lcl_BitMaskToAny(uno::Any & o_rValue,
}
static void
-lcl_ReAssignTOXType(SwDoc* pDoc, SwTOXBase& rTOXBase, const OUString& rNewName)
+lcl_ReAssignTOXType(SwDoc& rDoc, SwTOXBase& rTOXBase, const OUString& rNewName)
{
- const sal_uInt16 nUserCount = pDoc->GetTOXTypeCount( TOX_USER );
+ const sal_uInt16 nUserCount = rDoc.GetTOXTypeCount( TOX_USER );
const SwTOXType* pNewType = nullptr;
for(sal_uInt16 nUser = 0; nUser < nUserCount; nUser++)
{
- const SwTOXType* pType = pDoc->GetTOXType( TOX_USER, nUser );
+ const SwTOXType* pType = rDoc.GetTOXType( TOX_USER, nUser );
if (pType->GetTypeName()==rNewName)
{
pNewType = pType;
@@ -114,7 +114,7 @@ lcl_ReAssignTOXType(SwDoc* pDoc, SwTOXBase& rTOXBase, const OUString& rNewName)
if(!pNewType)
{
SwTOXType aNewType(TOX_USER, rNewName);
- pNewType = pDoc->InsertTOXType( aNewType );
+ pNewType = rDoc.InsertTOXType( aNewType );
}
rTOXBase.RegisterToTOXType( *const_cast<SwTOXType*>(pNewType) );
@@ -594,7 +594,7 @@ SwXDocumentIndex::setPropertyValue(
{
if (rTOXBase.GetTOXType()->GetTypeName() != sNewName)
{
- lcl_ReAssignTOXType(pSectionFormat->GetDoc(),
+ lcl_ReAssignTOXType(*pSectionFormat->GetDoc(),
rTOXBase, sNewName);
}
}
@@ -1332,7 +1332,7 @@ SwXDocumentIndex::attach(const uno::Reference< text::XTextRange > & xTextRange)
if ((TOX_USER == pTOXType->GetType()) &&
m_pImpl->m_pProps->GetTypeName() != pTOXType->GetTypeName())
{
- lcl_ReAssignTOXType(pDoc, rTOXBase, m_pImpl->m_pProps->GetTypeName());
+ lcl_ReAssignTOXType(*pDoc, rTOXBase, m_pImpl->m_pProps->GetTypeName());
}
//TODO: apply Section attributes (columns and background)
SwTOXBaseSection *const pTOX =