summaryrefslogtreecommitdiff
path: root/sw/source/core/unocore/unoportenum.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/core/unocore/unoportenum.cxx')
-rw-r--r--sw/source/core/unocore/unoportenum.cxx64
1 files changed, 44 insertions, 20 deletions
diff --git a/sw/source/core/unocore/unoportenum.cxx b/sw/source/core/unocore/unoportenum.cxx
index 0e9634a7be69..8d5377dfbb0a 100644
--- a/sw/source/core/unocore/unoportenum.cxx
+++ b/sw/source/core/unocore/unoportenum.cxx
@@ -38,6 +38,8 @@
#include <unoredline.hxx>
#include <unofield.hxx>
#include <unometa.hxx>
+#include <fmtfld.hxx>
+#include <fldbas.hxx>
#include <fmtmeta.hxx>
#include <fmtanchr.hxx>
#include <fmtrfmrk.hxx>
@@ -417,7 +419,7 @@ lcl_CreateRefMarkPortion(
{
pPortion = new SwXTextPortion(pUnoCrsr, xParent, PORTION_REFMARK_START);
pPortion->SetRefMark(xContent);
- pPortion->SetCollapsed(rAttr.GetEnd() ? false : true);
+ pPortion->SetCollapsed(rAttr.End() ? false : true);
}
else
{
@@ -437,7 +439,7 @@ lcl_InsertRubyPortion(
SwXTextPortion* pPortion = new SwXTextPortion(pUnoCrsr,
static_cast<const SwTxtRuby&>(rAttr), xParent, bEnd);
rPortions.push_back(pPortion);
- pPortion->SetCollapsed(rAttr.GetEnd() ? false : true);
+ pPortion->SetCollapsed(rAttr.End() ? false : true);
}
static Reference<XTextRange>
@@ -739,34 +741,56 @@ lcl_ExportHints(
pPortion->SetBookmark(SwXFieldmark::CreateXFieldmark(*pDoc, *it->get()));
}
}
- break;
- case RES_TXTATR_FLYCNT :
+ break;
+
+ case RES_TXTATR_INPUTFIELD:
if(!bRightMoveForbidden)
{
- pUnoCrsr->Right(1,CRSR_SKIP_CHARS,sal_False,sal_False);
+
+ pUnoCrsr->Right(
+ pAttr->GetFmtFld().GetField()->GetPar1().getLength() + 2,
+ CRSR_SKIP_CHARS,
+ sal_False,
+ sal_False );
if( *pUnoCrsr->GetMark() == *pUnoCrsr->GetPoint() )
- break; // Robust #i81708 content in covered cells
- pUnoCrsr->Exchange();
- xRef = new SwXTextPortion(
- pUnoCrsr, xParent, PORTION_FRAME);
+ break;
+ SwXTextPortion* pPortion =
+ new SwXTextPortion( pUnoCrsr, xParent, PORTION_FIELD);
+ xRef = pPortion;
+ Reference<XTextField> xField =
+ SwXTextField::CreateXTextField(*pDoc, pAttr->GetFmtFld());
+ pPortion->SetTextField(xField);
}
- break;
- case RES_TXTATR_FTN :
- {
+ break;
+
+ case RES_TXTATR_FLYCNT:
if(!bRightMoveForbidden)
{
pUnoCrsr->Right(1,CRSR_SKIP_CHARS,sal_False,sal_False);
if( *pUnoCrsr->GetMark() == *pUnoCrsr->GetPoint() )
- break;
- SwXTextPortion* pPortion;
- xRef = pPortion = new SwXTextPortion(
+ break; // Robust #i81708 content in covered cells
+ pUnoCrsr->Exchange();
+ xRef = new SwXTextPortion( pUnoCrsr, xParent, PORTION_FRAME);
+ }
+ break;
+
+ case RES_TXTATR_FTN:
+ {
+ if(!bRightMoveForbidden)
+ {
+ pUnoCrsr->Right(1,CRSR_SKIP_CHARS,sal_False,sal_False);
+ if( *pUnoCrsr->GetMark() == *pUnoCrsr->GetPoint() )
+ break;
+ SwXTextPortion* pPortion;
+ xRef = pPortion = new SwXTextPortion(
pUnoCrsr, xParent, PORTION_FOOTNOTE);
- Reference<XFootnote> xContent =
- SwXFootnotes::GetObject(*pDoc, pAttr->GetFtn());
- pPortion->SetFootnote(xContent);
+ Reference<XFootnote> xContent =
+ SwXFootnotes::GetObject(*pDoc, pAttr->GetFtn());
+ pPortion->SetFootnote(xContent);
+ }
}
- }
- break;
+ break;
+
case RES_TXTATR_TOXMARK:
case RES_TXTATR_REFMARK:
{