diff options
Diffstat (limited to 'sw/source/core')
-rw-r--r-- | sw/source/core/bastyp/init.cxx | 1 | ||||
-rw-r--r-- | sw/source/core/doc/doctxm.cxx | 6 | ||||
-rw-r--r-- | sw/source/core/inc/txmsrt.hxx | 3 | ||||
-rw-r--r-- | sw/source/core/tox/txmsrt.cxx | 13 |
4 files changed, 19 insertions, 4 deletions
diff --git a/sw/source/core/bastyp/init.cxx b/sw/source/core/bastyp/init.cxx index e6af8f9b1f4c..991cdd1caa2c 100644 --- a/sw/source/core/bastyp/init.cxx +++ b/sw/source/core/bastyp/init.cxx @@ -425,6 +425,7 @@ const sal_Char* pMarkToText = "text"; const sal_Char* pMarkToOutline = "outline"; const sal_Char* pMarkToGraphic = "graphic"; const sal_Char* pMarkToOLE = "ole"; +const sal_Char* pMarkToSequence = "sequence"; std::vector<SvGlobalName*> *pGlobalOLEExcludeList = 0; diff --git a/sw/source/core/doc/doctxm.cxx b/sw/source/core/doc/doctxm.cxx index 1bcd89285fd6..2029d9f30ee3 100644 --- a/sw/source/core/doc/doctxm.cxx +++ b/sw/source/core/doc/doctxm.cxx @@ -1261,7 +1261,11 @@ void SwTOXBaseSection::UpdateSequence( const SwTxtNode* pOwnChapterNode ) ( !IsFromChapter() || ::lcl_FindChapterNode( rTxtNode, 0 ) == pOwnChapterNode ) ) { - SwTOXPara * pNew = new SwTOXPara( rTxtNode, nsSwTOXElement::TOX_SEQUENCE, 1 ); + const SwSetExpField* pSeqField = dynamic_cast< const SwSetExpField* >( pFmtFld->GetFld() ); + OUString sName = GetSequenceName(); + sName += OUString( cSequenceMarkSeparator ); + sName += OUString::valueOf( sal_Int32( pSeqField->GetSeqNumber() ) ); + SwTOXPara * pNew = new SwTOXPara( rTxtNode, nsSwTOXElement::TOX_SEQUENCE, 1, sName ); // set indexes if the number or the reference text are to be displayed if( GetCaptionDisplay() == CAPTION_TEXT ) { diff --git a/sw/source/core/inc/txmsrt.hxx b/sw/source/core/inc/txmsrt.hxx index 05cdaf1b9d74..356f49d9fb1c 100644 --- a/sw/source/core/inc/txmsrt.hxx +++ b/sw/source/core/inc/txmsrt.hxx @@ -229,7 +229,7 @@ private: struct SwTOXPara : public SwTOXSortTabBase { - SwTOXPara( const SwCntntNode&, SwTOXElement, sal_uInt16 nLevel = FORM_ALPHA_DELIMITTER ); + SwTOXPara( const SwCntntNode&, SwTOXElement, sal_uInt16 nLevel = FORM_ALPHA_DELIMITTER, OUString sSeqName = OUString() ); virtual ~SwTOXPara() {} void SetStartIndex( xub_StrLen nSet) { nStartIndex = nSet;} @@ -246,6 +246,7 @@ private: sal_uInt16 m_nLevel; xub_StrLen nStartIndex; xub_StrLen nEndIndex; + OUString m_sSequenceName; }; struct SwTOXTable : public SwTOXSortTabBase diff --git a/sw/source/core/tox/txmsrt.cxx b/sw/source/core/tox/txmsrt.cxx index 22e7091e00d4..6f12284dcd5c 100644 --- a/sw/source/core/tox/txmsrt.cxx +++ b/sw/source/core/tox/txmsrt.cxx @@ -571,12 +571,13 @@ sal_uInt16 SwTOXContent::GetLevel() const The position must not come from the document, but from the "anchor"! --------------------------------------------------------------------*/ -SwTOXPara::SwTOXPara( const SwCntntNode& rNd, SwTOXElement eT, sal_uInt16 nLevel ) +SwTOXPara::SwTOXPara( const SwCntntNode& rNd, SwTOXElement eT, sal_uInt16 nLevel, OUString sSeqName ) : SwTOXSortTabBase( TOX_SORT_PARA, &rNd, 0, 0 ), eType( eT ), m_nLevel(nLevel), nStartIndex(0), - nEndIndex(STRING_LEN) + nEndIndex(STRING_LEN), + m_sSequenceName( sSeqName ) { } @@ -699,6 +700,14 @@ String SwTOXPara::GetURL() const } } break; + case nsSwTOXElement::TOX_SEQUENCE: + { + aTxt = '#'; + aTxt += m_sSequenceName; + aTxt += cMarkSeparator; + aTxt.AppendAscii( pMarkToSequence ); + } + break; default: break; } return aTxt; |