summaryrefslogtreecommitdiff
path: root/sw/source/filter
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/filter')
-rw-r--r--sw/source/filter/ascii/ascatr.cxx4
-rw-r--r--sw/source/filter/html/htmlatr.cxx2
-rw-r--r--sw/source/filter/html/htmlnum.cxx2
-rw-r--r--sw/source/filter/html/htmlplug.cxx2
-rw-r--r--sw/source/filter/html/htmltab.cxx6
-rw-r--r--sw/source/filter/ww8/writerhelper.cxx6
-rw-r--r--sw/source/filter/ww8/writerwordglue.cxx10
-rw-r--r--sw/source/filter/ww8/wrtw8nds.cxx2
-rw-r--r--sw/source/filter/xml/xmltbli.cxx12
9 files changed, 19 insertions, 27 deletions
diff --git a/sw/source/filter/ascii/ascatr.cxx b/sw/source/filter/ascii/ascatr.cxx
index ec8129eab961..da433d4272e0 100644
--- a/sw/source/filter/ascii/ascatr.cxx
+++ b/sw/source/filter/ascii/ascatr.cxx
@@ -180,7 +180,7 @@ private:
public:
SwASC_RedlineIter(SwASCWriter const& rWriter, SwTextNode const& rNode)
: m_rNode(rNode)
- , m_rIDRA(rNode.GetDoc()->getIDocumentRedlineAccess())
+ , m_rIDRA(rNode.GetDoc().getIDocumentRedlineAccess())
, m_nextRedline(rWriter.m_bHideDeleteRedlines
? m_rIDRA.GetRedlinePos(m_rNode, RedlineType::Delete)
: SwRedlineTable::npos)
@@ -266,7 +266,7 @@ static Writer& OutASC_SwTextNode( Writer& rWrt, SwContentNode& rNode )
const SwNumRule* pNumRule = rNd.GetNumRule();
if (pNumRule && !nStrPos && rWrt.m_bExportParagraphNumbering && !bIsOneParagraph)
{
- bool bIsOutlineNumRule = pNumRule == rNd.GetDoc()->GetOutlineNumRule();
+ bool bIsOutlineNumRule = pNumRule == rNd.GetDoc().GetOutlineNumRule();
// indent each numbering level by 4 spaces
OUString level;
diff --git a/sw/source/filter/html/htmlatr.cxx b/sw/source/filter/html/htmlatr.cxx
index dd55897b2d8d..9a96233407b4 100644
--- a/sw/source/filter/html/htmlatr.cxx
+++ b/sw/source/filter/html/htmlatr.cxx
@@ -2240,7 +2240,7 @@ Writer& OutHTML_SwTextNode( Writer& rWrt, const SwContentNode& rNode )
// export numbering string as plain text only for the outline numbering,
// because the outline numbering isn't exported as a numbering - see <SwHTMLNumRuleInfo::Set(..)>
if ( pNd->IsOutline() &&
- pNd->GetNumRule() == pNd->GetDoc()->GetOutlineNumRule() )
+ pNd->GetNumRule() == pNd->GetDoc().GetOutlineNumRule() )
{
aOutlineText = pNd->GetNumString();
nOffset = nOffset + aOutlineText.getLength();
diff --git a/sw/source/filter/html/htmlnum.cxx b/sw/source/filter/html/htmlnum.cxx
index 840fd61e88bd..9d5ed50d57e7 100644
--- a/sw/source/filter/html/htmlnum.cxx
+++ b/sw/source/filter/html/htmlnum.cxx
@@ -25,7 +25,7 @@ void SwHTMLNumRuleInfo::Set( const SwTextNode& rTextNd )
{
const SwNumRule* pTextNdNumRule( rTextNd.GetNumRule() );
if ( pTextNdNumRule &&
- pTextNdNumRule != rTextNd.GetDoc()->GetOutlineNumRule() )
+ pTextNdNumRule != rTextNd.GetDoc().GetOutlineNumRule() )
{
pNumRule = const_cast<SwNumRule*>(pTextNdNumRule);
nDeep = static_cast< sal_uInt16 >(pNumRule ? rTextNd.GetActualListLevel() + 1 : 0);
diff --git a/sw/source/filter/html/htmlplug.cxx b/sw/source/filter/html/htmlplug.cxx
index 265deafe963f..645ecbd1b358 100644
--- a/sw/source/filter/html/htmlplug.cxx
+++ b/sw/source/filter/html/htmlplug.cxx
@@ -514,7 +514,7 @@ bool SwHTMLParser::InsertEmbed()
Size aTwipSize(pDevice->PixelToLogic(aSize, MapMode(MapUnit::MapTwip)));
SwFormatFrameSize aFrameSize(SwFrameSize::Fixed, aTwipSize.Width(), aTwipSize.Height());
aAttrSet.Put(aFrameSize);
- pOLENode->GetDoc()->SetFlyFrameAttr(*pFormat, aAttrSet);
+ pOLENode->GetDoc().SetFlyFrameAttr(*pFormat, aAttrSet);
return true;
}
diff --git a/sw/source/filter/html/htmltab.cxx b/sw/source/filter/html/htmltab.cxx
index 65cdc272d118..6207967f3677 100644
--- a/sw/source/filter/html/htmltab.cxx
+++ b/sw/source/filter/html/htmltab.cxx
@@ -4945,13 +4945,13 @@ void SwHTMLParser::ClearFootnotesMarksInRange(const SwNodeIndex& rMkNdIdx, const
//follow DelFlyInRange pattern here
assert(rMkNdIdx.GetIndex() <= rPtNdIdx.GetIndex());
- SwDoc* pDoc = rMkNdIdx.GetNode().GetDoc();
+ SwDoc& rDoc = rMkNdIdx.GetNode().GetDoc();
//ofz#9733 drop bookmarks in this range
- IDocumentMarkAccess* const pMarkAccess = pDoc->getIDocumentMarkAccess();
+ IDocumentMarkAccess* const pMarkAccess = rDoc.getIDocumentMarkAccess();
pMarkAccess->deleteMarks(rMkNdIdx, SwNodeIndex(rPtNdIdx, 1), nullptr, nullptr, nullptr);
- SwFrameFormats& rTable = *pDoc->GetSpzFrameFormats();
+ SwFrameFormats& rTable = *rDoc.GetSpzFrameFormats();
for ( auto i = rTable.size(); i; )
{
SwFrameFormat *pFormat = rTable[--i];
diff --git a/sw/source/filter/ww8/writerhelper.cxx b/sw/source/filter/ww8/writerhelper.cxx
index f999656c440e..af79be052618 100644
--- a/sw/source/filter/ww8/writerhelper.cxx
+++ b/sw/source/filter/ww8/writerhelper.cxx
@@ -542,13 +542,9 @@ namespace sw
rTextNode.GetActualListLevel());
}
- OSL_ENSURE(rTextNode.GetDoc(), "No document for node?, suspicious");
- if (!rTextNode.GetDoc())
- return nullptr;
-
if (
rTextNode.IsNumbered() && rTextNode.IsCountedInList() &&
- nullptr != (pRule = rTextNode.GetDoc()->GetOutlineNumRule())
+ nullptr != (pRule = rTextNode.GetDoc().GetOutlineNumRule())
)
{
return GetNumFormatFromSwNumRuleLevel(*pRule,
diff --git a/sw/source/filter/ww8/writerwordglue.cxx b/sw/source/filter/ww8/writerwordglue.cxx
index b6a22c593969..988890f66fd7 100644
--- a/sw/source/filter/ww8/writerwordglue.cxx
+++ b/sw/source/filter/ww8/writerwordglue.cxx
@@ -519,14 +519,10 @@ namespace sw
const OUString &rText = rTextNd.GetText();
bool bParaIsRTL = false;
- OSL_ENSURE(rTextNd.GetDoc(), "No document for node?, suspicious");
- if (rTextNd.GetDoc())
+ if (SvxFrameDirection::Horizontal_RL_TB ==
+ rTextNd.GetDoc().GetTextDirection(SwPosition(rTextNd)))
{
- if (SvxFrameDirection::Horizontal_RL_TB ==
- rTextNd.GetDoc()->GetTextDirection(SwPosition(rTextNd)))
- {
- bParaIsRTL = true;
- }
+ bParaIsRTL = true;
}
using namespace ::com::sun::star::i18n;
diff --git a/sw/source/filter/ww8/wrtw8nds.cxx b/sw/source/filter/ww8/wrtw8nds.cxx
index 3e9b52d40516..2b5b66fab0cf 100644
--- a/sw/source/filter/ww8/wrtw8nds.cxx
+++ b/sw/source/filter/ww8/wrtw8nds.cxx
@@ -2149,7 +2149,7 @@ bool MSWordExportBase::NeedTextNodeSplit( const SwTextNode& rNd, SwSoftPageBreak
rNd.fillSoftPageBreakList(tmp);
// hack: move the break behind any field marks; currently we can't hide the
// field mark instruction so the layout position is quite meaningless
- IDocumentMarkAccess const& rIDMA(*rNd.GetDoc()->getIDocumentMarkAccess());
+ IDocumentMarkAccess const& rIDMA(*rNd.GetDoc().getIDocumentMarkAccess());
sal_Int32 pos(-1);
for (auto const& it : tmp)
{
diff --git a/sw/source/filter/xml/xmltbli.cxx b/sw/source/filter/xml/xmltbli.cxx
index 67cf9cc61ca7..87e0eb9c712f 100644
--- a/sw/source/filter/xml/xmltbli.cxx
+++ b/sw/source/filter/xml/xmltbli.cxx
@@ -1119,7 +1119,7 @@ static OUString lcl_GenerateFieldTypeName(const OUString& sPrefix, SwTableNode*
++nCount;
sName = sPrefixStr + OUString::number(nCount);
}
- while (nullptr != pTableNode->GetDoc()->getIDocumentFieldsAccess().GetFieldType(SwFieldIds::Dde, sName, false));
+ while (nullptr != pTableNode->GetDoc().getIDocumentFieldsAccess().GetFieldType(SwFieldIds::Dde, sName, false));
return sName;
}
@@ -1153,7 +1153,7 @@ static SwDDEFieldType* lcl_GetDDEFieldType(SwXMLDDETableContext_Impl* pContext,
else
{
// check for existing DDE field type with the same name
- SwDDEFieldType* pOldType = static_cast<SwDDEFieldType*>(pTableNode->GetDoc()->getIDocumentFieldsAccess().GetFieldType(SwFieldIds::Dde, sName, false));
+ SwDDEFieldType* pOldType = static_cast<SwDDEFieldType*>(pTableNode->GetDoc().getIDocumentFieldsAccess().GetFieldType(SwFieldIds::Dde, sName, false));
if (nullptr != pOldType)
{
// same values -> return old type
@@ -1179,7 +1179,7 @@ static SwDDEFieldType* lcl_GetDDEFieldType(SwXMLDDETableContext_Impl* pContext,
// create new field type and return
SwDDEFieldType aDDEFieldType(sName, sCommand, nType);
pType = static_cast<SwDDEFieldType*>(pTableNode->
- GetDoc()->getIDocumentFieldsAccess().InsertFieldType(aDDEFieldType));
+ GetDoc().getIDocumentFieldsAccess().InsertFieldType(aDDEFieldType));
}
OSL_ENSURE(nullptr != pType, "We really want a SwDDEFieldType here!");
@@ -2598,7 +2598,7 @@ void SwXMLTableContext::MakeTable()
if (!m_pRows || m_pRows->empty() || !GetColumnCount())
{
OSL_FAIL("invalid table: no cells; deleting...");
- m_pTableNode->GetDoc()->getIDocumentContentOperations().DeleteSection( m_pTableNode );
+ m_pTableNode->GetDoc().getIDocumentContentOperations().DeleteSection( m_pTableNode );
m_pTableNode = nullptr;
m_pBox1 = nullptr;
m_bOwnsBox1 = false;
@@ -2766,7 +2766,7 @@ void SwXMLTableContext::MakeTable()
}
// ??? this is always false: root frame is only created in SwViewShell::Init
- if( m_pTableNode->GetDoc()->getIDocumentLayoutAccess().GetCurrentViewShell() )
+ if( m_pTableNode->GetDoc().getIDocumentLayoutAccess().GetCurrentViewShell() )
{
m_pTableNode->DelFrames();
SwNodeIndex aIdx( *m_pTableNode->EndOfSectionNode(), 1 );
@@ -2826,7 +2826,7 @@ const SwStartNode *SwXMLTableContext::InsertTableSection(
OSL_ENSURE( pDoc, "<SwXMLTableContext::InsertTableSection(..)> - no <pDoc> at <SwXTextCursor> instance - <SwXTextCurosr> doesn't seem to be registered at a <SwUnoCursor> instance." );
if ( !pDoc )
{
- pDoc = const_cast<SwDoc*>(pEndNd->GetDoc());
+ pDoc = &const_cast<SwDoc&>(pEndNd->GetDoc());
}
sal_uInt32 nOffset = pPrevSttNd ? 1UL : 0UL;
SwNodeIndex aIdx( *pEndNd, nOffset );