summaryrefslogtreecommitdiff
path: root/sw/inc/tox.hxx
diff options
context:
space:
mode:
authorYogeshBharate <yogesh.bharate@synerzip.com>2014-04-04 15:56:03 +0530
committerMiklos Vajna <vmiklos@collabora.co.uk>2014-04-10 08:15:54 +0000
commita7bc9c1e4977bd3430df69287fa0a8377a686c58 (patch)
treefa9ebadf62faeaf12f63381115be1cca3e3e74ca /sw/inc/tox.hxx
parent1d25e1de0b9498e469cb052b2d86bf7f7ae6adae (diff)
fdo#77051: Preservation of Index field flag '\f'.
Problem Description: - In LibreOffice, the index field flag '\f' was not getting preserved after roundtrip as there was no support for it. - '\f' field flag is used for Specific Entry Type. ex. In our case it is "Syn" Implementation: - Provided import & export support for Index field flag '\f' and added UT for the same. Change-Id: I97c2456dd73c8bdf89ab105f8cac71bf7e2ad164 Reviewed-on: https://gerrit.libreoffice.org/8839 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Miklos Vajna <vmiklos@collabora.co.uk>
Diffstat (limited to 'sw/inc/tox.hxx')
-rw-r--r--sw/inc/tox.hxx19
1 files changed, 19 insertions, 0 deletions
diff --git a/sw/inc/tox.hxx b/sw/inc/tox.hxx
index 360f1d44b383..859374fc29af 100644
--- a/sw/inc/tox.hxx
+++ b/sw/inc/tox.hxx
@@ -67,6 +67,7 @@ class SW_DLLPUBLIC SwTOXMark
sal_uInt16 nLevel;
OUString m_aBookmarkName;
+ OUString m_aEntryTypeName; // stored specific entry type name for INDEX field \f
sal_Bool bAutoGenerated : 1; // generated using a concordance file
sal_Bool bMainEntry : 1; // main entry emphasized by character style
@@ -107,6 +108,8 @@ public:
inline sal_uInt16 GetLevel() const;
inline void SetBookmarkName( const OUString& bName);
inline OUString GetBookmarkName() const;
+ inline void SetEntryTypeName( const OUString& sName);
+ inline OUString GetEntryTypeName() const;
// for alphabetical index only
inline void SetPrimaryKey(const OUString& rStr );
@@ -394,6 +397,7 @@ namespace nsSwTOXElement
const SwTOXElement TOX_BOOKMARK = 1024;
const SwTOXElement TOX_NEWLINE = 2048;
const SwTOXElement TOX_PARAGRAPH_OUTLINE_LEVEL = 4096;
+ const SwTOXElement TOX_INDEX_ENTRY_TYPE = 8192;
}
typedef sal_uInt16 SwTOIOptions;
@@ -438,6 +442,7 @@ class SW_DLLPUBLIC SwTOXBase : public SwClient
OUString aName; // unique name
OUString aTitle; // title
OUString m_aBookmarkName; //Bookmark Name
+ OUString m_aEntryTypeName; // Type name
OUString sMainEntryCharStyle; // name of the character style applied to main index entries
@@ -507,6 +512,10 @@ public:
OUString GetMainEntryCharStyle() const {return sMainEntryCharStyle;}
void SetMainEntryCharStyle(const OUString& rSet) {sMainEntryCharStyle = rSet;}
+ // for record the Index field expression of MS Word
+ OUString GetEntryTypeName() const;
+ void SetEntryTypeName(const OUString& sName);
+
// content index only
inline void SetLevel(sal_uInt16); // consider outline level
inline sal_uInt16 GetLevel() const;
@@ -584,6 +593,9 @@ inline OUString SwTOXMark::GetAlternativeText() const
inline OUString SwTOXMark::GetBookmarkName() const
{ return m_aBookmarkName; }
+inline OUString SwTOXMark::GetEntryTypeName() const
+ { return m_aEntryTypeName; }
+
inline const SwTOXType* SwTOXMark::GetTOXType() const
{ return (SwTOXType*)GetRegisteredIn(); }
@@ -600,6 +612,10 @@ inline void SwTOXMark::SetBookmarkName(const OUString& bName)
m_aBookmarkName = bName;
}
+inline void SwTOXMark::SetEntryTypeName(const OUString& sName)
+{
+ m_aEntryTypeName = sName;
+}
inline void SwTOXMark::SetLevel( sal_uInt16 nLvl )
{
SAL_WARN_IF( GetTOXType() && GetTOXType()->GetType() == TOX_INDEX, "sw", "Wrong type");
@@ -730,6 +746,9 @@ inline OUString SwTOXBase::GetTitle() const
inline OUString SwTOXBase::GetBookmarkName() const
{ return m_aBookmarkName; }
+inline OUString SwTOXBase::GetEntryTypeName() const
+ { return m_aEntryTypeName; }
+
inline OUString SwTOXBase::GetTypeName() const
{ return GetTOXType()->GetTypeName(); }