summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Stahl <Michael.Stahl@cib.de>2018-11-08 13:46:03 +0100
committerMichael Stahl <Michael.Stahl@cib.de>2018-11-10 19:49:27 +0100
commit1cfe06a6ac01d8b16659938be460a1ced78ff870 (patch)
tree389c03894527974c2676e9b5e08b1a32c3812c7d
parentsw_redlinehide_3: SwNodeText::GetExpandText overload is... (diff)
downloadcore-1cfe06a6ac01d8b16659938be460a1ced78ff870.tar.gz
core-1cfe06a6ac01d8b16659938be460a1ced78ff870.zip
sw_redlinehide_3: pass current layout through ModelToViewHelper
The expansion of footnotes (and soon text fields) depends on the layout's mode. In SwXFlatParagraphIterator, just use whatever is SwDoc's "current" layout, should be good enough... Change-Id: Ica3b9eae56b14910c435c0f9c3f8ab6dbcda105f
-rw-r--r--sw/inc/doc.hxx1
-rw-r--r--sw/inc/modeltoviewhelper.hxx3
-rw-r--r--sw/qa/core/uwriter.cxx38
-rw-r--r--sw/source/core/doc/docedt.cxx3
-rw-r--r--sw/source/core/edit/edlingu.cxx12
-rw-r--r--sw/source/core/tox/ToxTextGenerator.cxx2
-rw-r--r--sw/source/core/txtnode/modeltoviewhelper.cxx5
-rw-r--r--sw/source/core/txtnode/ndtxt.cxx4
-rw-r--r--sw/source/core/txtnode/txtedt.cxx6
-rw-r--r--sw/source/core/unocore/unoflatpara.cxx6
10 files changed, 46 insertions, 34 deletions
diff --git a/sw/inc/doc.hxx b/sw/inc/doc.hxx
index 593428d3956a..ab388b68023c 100644
--- a/sw/inc/doc.hxx
+++ b/sw/inc/doc.hxx
@@ -632,6 +632,7 @@ public:
css::uno::Any
Spell( SwPaM&, css::uno::Reference< css::linguistic2::XSpellChecker1 > const &,
sal_uInt16* pPageCnt, sal_uInt16* pPageSt, bool bGrammarCheck,
+ SwRootFrame const* pLayout, // for grammar-check
SwConversionArgs *pConvArgs = nullptr ) const;
css::uno::Reference< css::linguistic2::XHyphenatedWord >
diff --git a/sw/inc/modeltoviewhelper.hxx b/sw/inc/modeltoviewhelper.hxx
index 03707596662d..7ca5397e3e81 100644
--- a/sw/inc/modeltoviewhelper.hxx
+++ b/sw/inc/modeltoviewhelper.hxx
@@ -26,6 +26,7 @@
#include <vector>
class SwTextNode;
+class SwRootFrame;
/** Some helpers for converting model strings to view strings.
@@ -124,7 +125,7 @@ public:
ModelPosition() : mnPos(0), mnSubPos(0), mbIsField(false) {}
};
- ModelToViewHelper(const SwTextNode &rNode,
+ ModelToViewHelper(const SwTextNode &rNode, SwRootFrame const* pLayout,
// defaults are appropriate for spell/grammar checking
ExpandMode eMode = ExpandMode::ExpandFields | ExpandMode::ExpandFootnote | ExpandMode::ReplaceMode);
ModelToViewHelper() //pass through filter, view == model
diff --git a/sw/qa/core/uwriter.cxx b/sw/qa/core/uwriter.cxx
index 2eb25ddd1687..ac06585c0efe 100644
--- a/sw/qa/core/uwriter.cxx
+++ b/sw/qa/core/uwriter.cxx
@@ -363,7 +363,7 @@ void SwDocTest::testModelToViewHelperPassthrough()
{
SwTextNode* pTextNode = getModelToViewTestDocument(m_pDoc);
- ModelToViewHelper aModelToViewHelper(*pTextNode, ExpandMode::PassThrough);
+ ModelToViewHelper aModelToViewHelper(*pTextNode, nullptr, ExpandMode::PassThrough);
OUString sViewText = aModelToViewHelper.getViewText();
OUString sModelText = pTextNode->GetText();
CPPUNIT_ASSERT_EQUAL(sModelText, sViewText);
@@ -373,7 +373,8 @@ void SwDocTest::testModelToViewHelperExpandFieldsExpandFootnote()
{
SwTextNode* pTextNode = getModelToViewTestDocument(m_pDoc);
- ModelToViewHelper aModelToViewHelper(*pTextNode, ExpandMode::ExpandFields | ExpandMode::ExpandFootnote);
+ ModelToViewHelper aModelToViewHelper(*pTextNode, nullptr,
+ ExpandMode::ExpandFields | ExpandMode::ExpandFootnote);
OUString sViewText = aModelToViewHelper.getViewText();
CPPUNIT_ASSERT_EQUAL(
OUString("AAAAA BBBBB foo CCCCC foo DDDDD"), sViewText);
@@ -383,7 +384,7 @@ void SwDocTest::testModelToViewHelperExpandFieldsExpandFootnoteReplaceMode()
{
SwTextNode* pTextNode = getModelToViewTestDocument(m_pDoc);
- ModelToViewHelper aModelToViewHelper(*pTextNode,
+ ModelToViewHelper aModelToViewHelper(*pTextNode, nullptr,
ExpandMode::ExpandFields | ExpandMode::ExpandFootnote | ExpandMode::ReplaceMode);
OUString sViewText = aModelToViewHelper.getViewText();
CPPUNIT_ASSERT_EQUAL(
@@ -403,7 +404,7 @@ void SwDocTest::testModelToViewHelperExpandFields()
{
SwTextNode* pTextNode = getModelToViewTestDocument(m_pDoc);
- ModelToViewHelper aModelToViewHelper(*pTextNode, ExpandMode::ExpandFields);
+ ModelToViewHelper aModelToViewHelper(*pTextNode, nullptr, ExpandMode::ExpandFields);
OUString sViewText = aModelToViewHelper.getViewText();
CPPUNIT_ASSERT_EQUAL(
OUString("AAAAA BBBBB CCCCC DDDDD"), sViewText);
@@ -413,7 +414,7 @@ void SwDocTest::testModelToViewHelperExpandFieldsReplaceMode()
{
SwTextNode* pTextNode = getModelToViewTestDocument(m_pDoc);
- ModelToViewHelper aModelToViewHelper(*pTextNode,
+ ModelToViewHelper aModelToViewHelper(*pTextNode, nullptr,
ExpandMode::ExpandFields | ExpandMode::ReplaceMode);
OUString sViewText = aModelToViewHelper.getViewText();
CPPUNIT_ASSERT_EQUAL(OUString("AAAAA BBBBB CCCCC DDDDD"),
@@ -428,7 +429,7 @@ void SwDocTest::testModelToViewHelperExpandFieldsHideInvisible()
{
SwTextNode* pTextNode = getModelToViewTestDocument(m_pDoc);
- ModelToViewHelper aModelToViewHelper(*pTextNode, ExpandMode::HideInvisible);
+ ModelToViewHelper aModelToViewHelper(*pTextNode, nullptr, ExpandMode::HideInvisible);
OUString sViewText = aModelToViewHelper.getViewText();
CPPUNIT_ASSERT_EQUAL(
OUString("AAAAA CCCCC " + OUStringLiteral1(CH_TXTATR_BREAKWORD) + " DDDDD"),
@@ -439,7 +440,7 @@ void SwDocTest::testModelToViewHelperExpandFieldsHideRedlined()
{
SwTextNode* pTextNode = getModelToViewTestDocument(m_pDoc);
- ModelToViewHelper aModelToViewHelper(*pTextNode, ExpandMode::HideDeletions);
+ ModelToViewHelper aModelToViewHelper(*pTextNode, nullptr, ExpandMode::HideDeletions);
OUString sViewText = aModelToViewHelper.getViewText();
CPPUNIT_ASSERT_EQUAL(
OUString("AAAABB " + OUStringLiteral1(CH_TXTATR_BREAKWORD) + " CCCCC " + OUStringLiteral1(CH_TXTATR_BREAKWORD) + " DDDDD"),
@@ -450,7 +451,8 @@ void SwDocTest::testModelToViewHelperExpandFieldsHideInvisibleExpandFootnote()
{
SwTextNode* pTextNode = getModelToViewTestDocument(m_pDoc);
- ModelToViewHelper aModelToViewHelper(*pTextNode, ExpandMode::ExpandFields | ExpandMode::HideInvisible | ExpandMode::ExpandFootnote);
+ ModelToViewHelper aModelToViewHelper(*pTextNode, nullptr,
+ ExpandMode::ExpandFields | ExpandMode::HideInvisible | ExpandMode::ExpandFootnote);
OUString sViewText = aModelToViewHelper.getViewText();
CPPUNIT_ASSERT_EQUAL(OUString("AAAAA CCCCC foo DDDDD"), sViewText);
}
@@ -459,7 +461,7 @@ void SwDocTest::testModelToViewHelperExpandFieldsHideInvisibleExpandFootnoteRepl
{
SwTextNode* pTextNode = getModelToViewTestDocument(m_pDoc);
- ModelToViewHelper aModelToViewHelper(*pTextNode,
+ ModelToViewHelper aModelToViewHelper(*pTextNode, nullptr,
ExpandMode::ExpandFields | ExpandMode::HideInvisible | ExpandMode::ExpandFootnote | ExpandMode::ReplaceMode);
OUString sViewText = aModelToViewHelper.getViewText();
CPPUNIT_ASSERT_EQUAL(
@@ -477,7 +479,8 @@ void SwDocTest::testModelToViewHelperExpandFieldsHideHideRedlinedExpandFootnote(
{
SwTextNode* pTextNode = getModelToViewTestDocument(m_pDoc);
- ModelToViewHelper aModelToViewHelper(*pTextNode, ExpandMode::ExpandFields | ExpandMode::HideDeletions | ExpandMode::ExpandFootnote);
+ ModelToViewHelper aModelToViewHelper(*pTextNode, nullptr,
+ ExpandMode::ExpandFields | ExpandMode::HideDeletions | ExpandMode::ExpandFootnote);
OUString sViewText = aModelToViewHelper.getViewText();
CPPUNIT_ASSERT_EQUAL(
OUString("AAAABB foo CCCCC foo DDDDD"), sViewText);
@@ -487,7 +490,7 @@ void SwDocTest::testModelToViewHelperExpandFieldsHideHideRedlinedExpandFootnoteR
{
SwTextNode* pTextNode = getModelToViewTestDocument(m_pDoc);
- ModelToViewHelper aModelToViewHelper(*pTextNode,
+ ModelToViewHelper aModelToViewHelper(*pTextNode, nullptr,
ExpandMode::ExpandFields | ExpandMode::HideDeletions | ExpandMode::ExpandFootnote | ExpandMode::ReplaceMode);
OUString sViewText = aModelToViewHelper.getViewText();
CPPUNIT_ASSERT_EQUAL(
@@ -507,7 +510,8 @@ void SwDocTest::testModelToViewHelperHideInvisibleHideRedlined()
{
SwTextNode* pTextNode = getModelToViewTestDocument(m_pDoc);
- ModelToViewHelper aModelToViewHelper(*pTextNode, ExpandMode::HideInvisible | ExpandMode::HideDeletions);
+ ModelToViewHelper aModelToViewHelper(*pTextNode, nullptr,
+ ExpandMode::HideInvisible | ExpandMode::HideDeletions);
OUString sViewText = aModelToViewHelper.getViewText();
OUStringBuffer aBuffer;
aBuffer.append("AAAACCCCC ");
@@ -520,7 +524,8 @@ void SwDocTest::testModelToViewHelperExpandFieldsHideInvisibleHideRedlinedExpand
{
SwTextNode* pTextNode = getModelToViewTestDocument(m_pDoc);
- ModelToViewHelper aModelToViewHelper(*pTextNode, ExpandMode::ExpandFields | ExpandMode::HideInvisible | ExpandMode::HideDeletions | ExpandMode::ExpandFootnote);
+ ModelToViewHelper aModelToViewHelper(*pTextNode, nullptr,
+ ExpandMode::ExpandFields | ExpandMode::HideInvisible | ExpandMode::HideDeletions | ExpandMode::ExpandFootnote);
OUString sViewText = aModelToViewHelper.getViewText();
CPPUNIT_ASSERT_EQUAL(OUString("AAAACCCCC foo DDDDD"), sViewText);
}
@@ -529,7 +534,7 @@ void SwDocTest::testModelToViewHelperExpandFieldsHideInvisibleHideRedlinedExpand
{
SwTextNode* pTextNode = getModelToViewTestDocument(m_pDoc);
- ModelToViewHelper aModelToViewHelper(*pTextNode,
+ ModelToViewHelper aModelToViewHelper(*pTextNode, nullptr,
ExpandMode::ExpandFields | ExpandMode::HideInvisible | ExpandMode::HideDeletions | ExpandMode::ExpandFootnote | ExpandMode::ReplaceMode);
OUString sViewText = aModelToViewHelper.getViewText();
CPPUNIT_ASSERT_EQUAL(sViewText,
@@ -546,7 +551,8 @@ void SwDocTest::testModelToViewHelperExpandFieldsExpandFootnote2()
{
SwTextNode* pTextNode = getModelToViewTestDocument2(m_pDoc);
- ModelToViewHelper aModelToViewHelper(*pTextNode, ExpandMode::ExpandFields | ExpandMode::ExpandFootnote);
+ ModelToViewHelper aModelToViewHelper(*pTextNode, nullptr,
+ ExpandMode::ExpandFields | ExpandMode::ExpandFootnote);
OUString sViewText = aModelToViewHelper.getViewText();
CPPUNIT_ASSERT_EQUAL(OUString("AAAAABBBBBCCCCC"), sViewText);
}
@@ -555,7 +561,7 @@ void SwDocTest::testModelToViewHelperExpandFieldsExpandFootnoteReplaceMode2()
{
SwTextNode* pTextNode = getModelToViewTestDocument2(m_pDoc);
- ModelToViewHelper aModelToViewHelper(*pTextNode,
+ ModelToViewHelper aModelToViewHelper(*pTextNode, nullptr,
ExpandMode::ExpandFields | ExpandMode::ExpandFootnote | ExpandMode::ReplaceMode);
OUString sViewText = aModelToViewHelper.getViewText();
CPPUNIT_ASSERT_EQUAL(
diff --git a/sw/source/core/doc/docedt.cxx b/sw/source/core/doc/docedt.cxx
index 2691b8d0b5f4..9fceec0533a6 100644
--- a/sw/source/core/doc/docedt.cxx
+++ b/sw/source/core/doc/docedt.cxx
@@ -501,6 +501,7 @@ uno::Any SwDoc::Spell( SwPaM& rPaM,
uno::Reference< XSpellChecker1 > const &xSpeller,
sal_uInt16* pPageCnt, sal_uInt16* pPageSt,
bool bGrammarCheck,
+ SwRootFrame const*const pLayout,
SwConversionArgs *pConvArgs ) const
{
SwPosition* pSttPos = rPaM.Start(), *pEndPos = rPaM.End();
@@ -602,7 +603,7 @@ uno::Any SwDoc::Spell( SwPaM& rPaM,
{
uno::Reference< lang::XComponent > xDoc( GetDocShell()->GetBaseModel(), uno::UNO_QUERY );
// Expand the string:
- const ModelToViewHelper aConversionMap(*pNd->GetTextNode());
+ const ModelToViewHelper aConversionMap(*pNd->GetTextNode(), pLayout);
const OUString& aExpandText = aConversionMap.getViewText();
// get XFlatParagraph to use...
diff --git a/sw/source/core/edit/edlingu.cxx b/sw/source/core/edit/edlingu.cxx
index bcb24e45abe3..2590c5ee641b 100644
--- a/sw/source/core/edit/edlingu.cxx
+++ b/sw/source/core/edit/edlingu.cxx
@@ -301,7 +301,7 @@ uno::Any SwSpellIter::Continue( sal_uInt16* pPageCnt, sal_uInt16* pPageSt )
*pMySh->GetCursor()->GetPoint() = *GetCurr();
*pMySh->GetCursor()->GetMark() = *GetEnd();
pMySh->GetDoc()->Spell(*pMySh->GetCursor(),
- xSpeller, pPageCnt, pPageSt, false ) >>= xSpellRet;
+ xSpeller, pPageCnt, pPageSt, false, pMySh->GetLayout()) >>= xSpellRet;
bGoOn = GetCursorCnt() > 1;
if( xSpellRet.is() )
{
@@ -367,7 +367,7 @@ uno::Any SwConvIter::Continue( sal_uInt16* pPageCnt, sal_uInt16* pPageSt )
// call function to find next text portion to be converted
uno::Reference< linguistic2::XSpellChecker1 > xEmpty;
pMySh->GetDoc()->Spell( *pMySh->GetCursor(),
- xEmpty, pPageCnt, pPageSt, false, &rArgs ) >>= aConvText;
+ xEmpty, pPageCnt, pPageSt, false, pMySh->GetLayout(), &rArgs) >>= aConvText;
bGoOn = GetCursorCnt() > 1;
if( !aConvText.isEmpty() )
@@ -978,7 +978,7 @@ bool SwEditShell::GetGrammarCorrection(
uno::Reference< lang::XComponent > xDoc( mxDoc->GetDocShell()->GetBaseModel(), uno::UNO_QUERY );
// Expand the string:
- const ModelToViewHelper aConversionMap(*pNode);
+ const ModelToViewHelper aConversionMap(*pNode, GetLayout());
const OUString& aExpandText = aConversionMap.getViewText();
// get XFlatParagraph to use...
uno::Reference< text::XFlatParagraph > xFlatPara = new SwXFlatParagraph( *pNode, aExpandText, aConversionMap );
@@ -1329,7 +1329,7 @@ bool SwSpellIter::SpellSentence(svx::SpellPortions& rPortions, bool bIsGrammarCh
}
uno::Any aSpellRet =
pMySh->GetDoc()->Spell(*pCursor,
- xSpeller, nullptr, nullptr, bIsGrammarCheck );
+ xSpeller, nullptr, nullptr, bIsGrammarCheck, pMySh->GetLayout());
aSpellRet >>= xSpellRet;
aSpellRet >>= aGrammarResult;
bGoOn = GetCursorCnt() > 1;
@@ -1397,7 +1397,7 @@ bool SwSpellIter::SpellSentence(svx::SpellPortions& rPortions, bool bIsGrammarCh
pMySh->GoEndSentence();
if( bGrammarErrorFound )
{
- const ModelToViewHelper aConversionMap(static_cast<SwTextNode&>(pCursor->GetNode()));
+ const ModelToViewHelper aConversionMap(static_cast<SwTextNode&>(pCursor->GetNode()), pMySh->GetLayout());
const OUString& aExpandText = aConversionMap.getViewText();
sal_Int32 nSentenceEnd =
aConversionMap.ConvertToViewPosition( aGrammarResult.nBehindEndOfSentencePosition );
@@ -1429,7 +1429,7 @@ bool SwSpellIter::SpellSentence(svx::SpellPortions& rPortions, bool bIsGrammarCh
xSpellRet = nullptr;
// don't search for grammar errors here anymore!
pMySh->GetDoc()->Spell(*pCursor,
- xSpeller, nullptr, nullptr, false ) >>= xSpellRet;
+ xSpeller, nullptr, nullptr, false, pMySh->GetLayout()) >>= xSpellRet;
if ( *pCursor->GetPoint() > *pCursor->GetMark() )
pCursor->Exchange();
SetCurr( new SwPosition( *pCursor->GetPoint() ));
diff --git a/sw/source/core/tox/ToxTextGenerator.cxx b/sw/source/core/tox/ToxTextGenerator.cxx
index 9ff14b6eedb6..31dab3d5b2fe 100644
--- a/sw/source/core/tox/ToxTextGenerator.cxx
+++ b/sw/source/core/tox/ToxTextGenerator.cxx
@@ -316,7 +316,7 @@ ToxTextGenerator::HandleTextToken(const SwTOXSortTabBase& source, SwAttrPool& po
result.autoFormats.push_back(std::move(clone));
- ModelToViewHelper aConversionMap( *pSrc, ExpandMode::ExpandFields );
+ ModelToViewHelper aConversionMap(*pSrc, nullptr, ExpandMode::ExpandFields);
result.startPositions.push_back(
stripper.GetPositionInStrippedString(aConversionMap.ConvertToViewPosition(
hint->GetStart() )));
diff --git a/sw/source/core/txtnode/modeltoviewhelper.cxx b/sw/source/core/txtnode/modeltoviewhelper.cxx
index 6b6dcb855e4c..8302e34604ce 100644
--- a/sw/source/core/txtnode/modeltoviewhelper.cxx
+++ b/sw/source/core/txtnode/modeltoviewhelper.cxx
@@ -80,7 +80,8 @@ struct containsPos
}
};
-ModelToViewHelper::ModelToViewHelper(const SwTextNode &rNode, ExpandMode eMode)
+ModelToViewHelper::ModelToViewHelper(const SwTextNode &rNode,
+ SwRootFrame const*const pLayout, ExpandMode eMode)
{
const OUString& rNodeText = rNode.GetText();
m_aRetText = rNodeText;
@@ -162,7 +163,7 @@ ModelToViewHelper::ModelToViewHelper(const SwTextNode &rNode, ExpandMode eMode)
const SwDoc *pDoc = rNode.GetDoc();
aFieldResult.m_sExpand = (eMode & ExpandMode::ReplaceMode)
? OUString(CHAR_ZWSP)
- : rFootnote.GetViewNumStr(*pDoc, nullptr/*TODO?*/);
+ : rFootnote.GetViewNumStr(*pDoc, pLayout);
aFieldResult.m_eType = FieldResult::FOOTNOTE;
}
break;
diff --git a/sw/source/core/txtnode/ndtxt.cxx b/sw/source/core/txtnode/ndtxt.cxx
index cbf522687445..7dbacee6596d 100644
--- a/sw/source/core/txtnode/ndtxt.cxx
+++ b/sw/source/core/txtnode/ndtxt.cxx
@@ -3390,8 +3390,8 @@ OUString SwTextNode::GetExpandText( const sal_Int32 nIdx,
{
ExpandMode eMode = ExpandMode::ExpandFields | eAdditionalMode;
- ModelToViewHelper aConversionMap(*this, eMode);
- const OUString& aExpandText = aConversionMap.getViewText();
+ ModelToViewHelper aConversionMap(*this, nullptr/*TODO*/, eMode);
+ const OUString aExpandText = aConversionMap.getViewText();
const sal_Int32 nExpandBegin = aConversionMap.ConvertToViewPosition( nIdx );
sal_Int32 nEnd = nLen == -1 ? GetText().getLength() : nIdx + nLen;
const sal_Int32 nExpandEnd = aConversionMap.ConvertToViewPosition( nEnd );
diff --git a/sw/source/core/txtnode/txtedt.cxx b/sw/source/core/txtnode/txtedt.cxx
index 74b33c963af8..d3e640531f79 100644
--- a/sw/source/core/txtnode/txtedt.cxx
+++ b/sw/source/core/txtnode/txtedt.cxx
@@ -1507,7 +1507,7 @@ SwRect SwTextFrame::SmartTagScan(SwTextNode & rNode)
if ( nBegin < nEnd )
{
// Expand the string:
- const ModelToViewHelper aConversionMap(*pNode /*TODO - replace or expand fields for smart tags?*/);
+ const ModelToViewHelper aConversionMap(*pNode, getRootFrame() /*TODO - replace or expand fields for smart tags?*/);
const OUString& aExpandText = aConversionMap.getViewText();
// Ownership ov ConversionMap is passed to SwXTextMarkup object!
@@ -2064,7 +2064,9 @@ bool SwTextNode::CountWords( SwDocStat& rStat,
}
// ConversionMap to expand fields, remove invisible and redline deleted text for scanner
- const ModelToViewHelper aConversionMap(*this, ExpandMode::ExpandFields | ExpandMode::ExpandFootnote | ExpandMode::HideInvisible | ExpandMode::HideDeletions);
+ const ModelToViewHelper aConversionMap(*this,
+ getIDocumentLayoutAccess().GetCurrentLayout(),
+ ExpandMode::ExpandFields | ExpandMode::ExpandFootnote | ExpandMode::HideInvisible | ExpandMode::HideDeletions);
const OUString& aExpandText = aConversionMap.getViewText();
if (aExpandText.isEmpty() && !bCountNumbering)
diff --git a/sw/source/core/unocore/unoflatpara.cxx b/sw/source/core/unocore/unoflatpara.cxx
index fe9a20658b7b..e63caf187e9f 100644
--- a/sw/source/core/unocore/unoflatpara.cxx
+++ b/sw/source/core/unocore/unoflatpara.cxx
@@ -487,7 +487,7 @@ uno::Reference< text::XFlatParagraph > SwXFlatParagraphIterator::getNextPara()
if ( pRet )
{
// Expand the string:
- const ModelToViewHelper aConversionMap(*pRet);
+ const ModelToViewHelper aConversionMap(*pRet, mpDoc->getIDocumentLayoutAccess().GetCurrentLayout());
const OUString& aExpandText = aConversionMap.getViewText();
xRet = new SwXFlatParagraph( *pRet, aExpandText, aConversionMap );
@@ -537,7 +537,7 @@ uno::Reference< text::XFlatParagraph > SwXFlatParagraphIterator::getParaAfter(co
if ( pNextTextNode )
{
// Expand the string:
- const ModelToViewHelper aConversionMap(*pNextTextNode);
+ const ModelToViewHelper aConversionMap(*pNextTextNode, mpDoc->getIDocumentLayoutAccess().GetCurrentLayout());
const OUString& aExpandText = aConversionMap.getViewText();
xRet = new SwXFlatParagraph( *pNextTextNode, aExpandText, aConversionMap );
@@ -583,7 +583,7 @@ uno::Reference< text::XFlatParagraph > SwXFlatParagraphIterator::getParaBefore(c
if ( pPrevTextNode )
{
// Expand the string:
- const ModelToViewHelper aConversionMap(*pPrevTextNode);
+ const ModelToViewHelper aConversionMap(*pPrevTextNode, mpDoc->getIDocumentLayoutAccess().GetCurrentLayout());
const OUString& aExpandText = aConversionMap.getViewText();
xRet = new SwXFlatParagraph( *pPrevTextNode, aExpandText, aConversionMap );