Kaydet (Commit) 495f4ca3 authored tarafından Miklos Vajna's avatar Miklos Vajna

sw: prefix members of SwTOXMark

Change-Id: Id8cc41ab9af5d6fe9934f97927c7e3d1e7f6ebf3
üst 5645fb51
...@@ -56,23 +56,23 @@ class SW_DLLPUBLIC SwTOXMark ...@@ -56,23 +56,23 @@ class SW_DLLPUBLIC SwTOXMark
friend void _InitCore(); friend void _InitCore();
friend class SwTextTOXMark; friend class SwTextTOXMark;
OUString aAltText; // Text of caption is different. OUString m_aAltText; // Text of caption is different.
OUString aPrimaryKey; OUString m_aPrimaryKey;
OUString aSecondaryKey; OUString m_aSecondaryKey;
OUString aCitationKeyReading; OUString m_aCitationKeyReading;
// three more strings for phonetic sorting // three more strings for phonetic sorting
OUString aTextReading; OUString m_aTextReading;
OUString aPrimaryKeyReading; OUString m_aPrimaryKeyReading;
OUString aSecondaryKeyReading; OUString m_aSecondaryKeyReading;
SwTextTOXMark* pTextAttr; SwTextTOXMark* m_pTextAttr;
sal_uInt16 nLevel; sal_uInt16 m_nLevel;
OUString m_aBookmarkName; OUString m_aBookmarkName;
OUString m_aEntryTypeName; // stored specific entry type name for INDEX field \f OUString m_aEntryTypeName; // stored specific entry type name for INDEX field \f
bool bAutoGenerated : 1; // generated using a concordance file bool m_bAutoGenerated : 1; // generated using a concordance file
bool bMainEntry : 1; // main entry emphasized by character style bool m_bMainEntry : 1; // main entry emphasized by character style
::com::sun::star::uno::WeakReference< ::com::sun::star::uno::WeakReference<
::com::sun::star::text::XDocumentIndexMark> m_wXDocumentIndexMark; ::com::sun::star::text::XDocumentIndexMark> m_wXDocumentIndexMark;
...@@ -128,16 +128,16 @@ public: ...@@ -128,16 +128,16 @@ public:
inline OUString GetPrimaryKeyReading() const; inline OUString GetPrimaryKeyReading() const;
inline OUString GetSecondaryKeyReading() const; inline OUString GetSecondaryKeyReading() const;
bool IsAutoGenerated() const {return bAutoGenerated;} bool IsAutoGenerated() const {return m_bAutoGenerated;}
void SetAutoGenerated(bool bSet) {bAutoGenerated = bSet;} void SetAutoGenerated(bool bSet) {m_bAutoGenerated = bSet;}
bool IsMainEntry() const {return bMainEntry;} bool IsMainEntry() const {return m_bMainEntry;}
void SetMainEntry(bool bSet) { bMainEntry = bSet;} void SetMainEntry(bool bSet) { m_bMainEntry = bSet;}
inline const SwTOXType* GetTOXType() const; inline const SwTOXType* GetTOXType() const;
const SwTextTOXMark* GetTextTOXMark() const { return pTextAttr; } const SwTextTOXMark* GetTextTOXMark() const { return m_pTextAttr; }
SwTextTOXMark* GetTextTOXMark() { return pTextAttr; } SwTextTOXMark* GetTextTOXMark() { return m_pTextAttr; }
SAL_DLLPRIVATE ::com::sun::star::uno::WeakReference< SAL_DLLPRIVATE ::com::sun::star::uno::WeakReference<
::com::sun::star::text::XDocumentIndexMark> const& GetXTOXMark() const ::com::sun::star::text::XDocumentIndexMark> const& GetXTOXMark() const
...@@ -535,7 +535,7 @@ public: ...@@ -535,7 +535,7 @@ public:
//SwTOXMark //SwTOXMark
inline OUString SwTOXMark::GetAlternativeText() const inline OUString SwTOXMark::GetAlternativeText() const
{ return aAltText; } { return m_aAltText; }
inline OUString SwTOXMark::GetBookmarkName() const inline OUString SwTOXMark::GetBookmarkName() const
{ return m_aBookmarkName; } { return m_aBookmarkName; }
...@@ -547,11 +547,11 @@ inline const SwTOXType* SwTOXMark::GetTOXType() const ...@@ -547,11 +547,11 @@ inline const SwTOXType* SwTOXMark::GetTOXType() const
{ return static_cast<const SwTOXType*>(GetRegisteredIn()); } { return static_cast<const SwTOXType*>(GetRegisteredIn()); }
inline bool SwTOXMark::IsAlternativeText() const inline bool SwTOXMark::IsAlternativeText() const
{ return !aAltText.isEmpty(); } { return !m_aAltText.isEmpty(); }
inline void SwTOXMark::SetAlternativeText(const OUString& rAlt) inline void SwTOXMark::SetAlternativeText(const OUString& rAlt)
{ {
aAltText = rAlt; m_aAltText = rAlt;
} }
inline void SwTOXMark::SetBookmarkName(const OUString& bName) inline void SwTOXMark::SetBookmarkName(const OUString& bName)
...@@ -566,79 +566,79 @@ inline void SwTOXMark::SetEntryTypeName(const OUString& sName) ...@@ -566,79 +566,79 @@ inline void SwTOXMark::SetEntryTypeName(const OUString& sName)
inline void SwTOXMark::SetLevel( sal_uInt16 nLvl ) inline void SwTOXMark::SetLevel( sal_uInt16 nLvl )
{ {
SAL_WARN_IF( GetTOXType() && GetTOXType()->GetType() == TOX_INDEX, "sw", "Wrong type"); SAL_WARN_IF( GetTOXType() && GetTOXType()->GetType() == TOX_INDEX, "sw", "Wrong type");
nLevel = nLvl; m_nLevel = nLvl;
} }
inline void SwTOXMark::SetPrimaryKey( const OUString& rKey ) inline void SwTOXMark::SetPrimaryKey( const OUString& rKey )
{ {
SAL_WARN_IF( GetTOXType()->GetType() != TOX_INDEX, "sw", "Wrong type"); SAL_WARN_IF( GetTOXType()->GetType() != TOX_INDEX, "sw", "Wrong type");
aPrimaryKey = rKey; m_aPrimaryKey = rKey;
} }
inline void SwTOXMark::SetSecondaryKey( const OUString& rKey ) inline void SwTOXMark::SetSecondaryKey( const OUString& rKey )
{ {
SAL_WARN_IF(GetTOXType()->GetType() != TOX_INDEX, "sw", "Wrong type"); SAL_WARN_IF(GetTOXType()->GetType() != TOX_INDEX, "sw", "Wrong type");
aSecondaryKey = rKey; m_aSecondaryKey = rKey;
} }
inline void SwTOXMark::SetTextReading( const OUString& rText ) inline void SwTOXMark::SetTextReading( const OUString& rText )
{ {
SAL_WARN_IF(GetTOXType()->GetType() != TOX_INDEX, "sw", "Wrong type"); SAL_WARN_IF(GetTOXType()->GetType() != TOX_INDEX, "sw", "Wrong type");
aTextReading = rText; m_aTextReading = rText;
} }
inline void SwTOXMark::SetPrimaryKeyReading( const OUString& rKey ) inline void SwTOXMark::SetPrimaryKeyReading( const OUString& rKey )
{ {
SAL_WARN_IF(GetTOXType()->GetType() != TOX_INDEX, "sw", "Wrong type"); SAL_WARN_IF(GetTOXType()->GetType() != TOX_INDEX, "sw", "Wrong type");
aPrimaryKeyReading = rKey; m_aPrimaryKeyReading = rKey;
} }
inline void SwTOXMark::SetCitationKeyReading( const OUString& rKey ) inline void SwTOXMark::SetCitationKeyReading( const OUString& rKey )
{ {
SAL_WARN_IF(GetTOXType()->GetType() != TOX_CITATION, "sw", "Wrong type"); SAL_WARN_IF(GetTOXType()->GetType() != TOX_CITATION, "sw", "Wrong type");
aCitationKeyReading = rKey; m_aCitationKeyReading = rKey;
} }
inline void SwTOXMark::SetSecondaryKeyReading( const OUString& rKey ) inline void SwTOXMark::SetSecondaryKeyReading( const OUString& rKey )
{ {
SAL_WARN_IF(GetTOXType()->GetType() != TOX_INDEX, "sw", "Wrong type"); SAL_WARN_IF(GetTOXType()->GetType() != TOX_INDEX, "sw", "Wrong type");
aSecondaryKeyReading = rKey; m_aSecondaryKeyReading = rKey;
} }
inline sal_uInt16 SwTOXMark::GetLevel() const inline sal_uInt16 SwTOXMark::GetLevel() const
{ {
SAL_WARN_IF( GetTOXType() && GetTOXType()->GetType() == TOX_INDEX, "sw", "Wrong type"); SAL_WARN_IF( GetTOXType() && GetTOXType()->GetType() == TOX_INDEX, "sw", "Wrong type");
return nLevel; return m_nLevel;
} }
inline OUString SwTOXMark::GetPrimaryKey() const inline OUString SwTOXMark::GetPrimaryKey() const
{ {
SAL_WARN_IF(GetTOXType()->GetType() != TOX_INDEX, "sw", "Wrong type"); SAL_WARN_IF(GetTOXType()->GetType() != TOX_INDEX, "sw", "Wrong type");
return aPrimaryKey; return m_aPrimaryKey;
} }
inline OUString SwTOXMark::GetSecondaryKey() const inline OUString SwTOXMark::GetSecondaryKey() const
{ {
SAL_WARN_IF(GetTOXType()->GetType() != TOX_INDEX, "sw", "Wrong type"); SAL_WARN_IF(GetTOXType()->GetType() != TOX_INDEX, "sw", "Wrong type");
return aSecondaryKey; return m_aSecondaryKey;
} }
inline OUString SwTOXMark::GetTextReading() const inline OUString SwTOXMark::GetTextReading() const
{ {
SAL_WARN_IF(GetTOXType()->GetType() != TOX_INDEX, "sw", "Wrong type"); SAL_WARN_IF(GetTOXType()->GetType() != TOX_INDEX, "sw", "Wrong type");
return aTextReading; return m_aTextReading;
} }
inline OUString SwTOXMark::GetPrimaryKeyReading() const inline OUString SwTOXMark::GetPrimaryKeyReading() const
{ {
SAL_WARN_IF(GetTOXType()->GetType() != TOX_INDEX, "sw", "Wrong type"); SAL_WARN_IF(GetTOXType()->GetType() != TOX_INDEX, "sw", "Wrong type");
return aPrimaryKeyReading; return m_aPrimaryKeyReading;
} }
inline OUString SwTOXMark::GetSecondaryKeyReading() const inline OUString SwTOXMark::GetSecondaryKeyReading() const
{ {
SAL_WARN_IF(GetTOXType()->GetType() != TOX_INDEX, "sw", "Wrong type"); SAL_WARN_IF(GetTOXType()->GetType() != TOX_INDEX, "sw", "Wrong type");
return aSecondaryKeyReading; return m_aSecondaryKeyReading;
} }
//SwForm //SwForm
......
...@@ -98,9 +98,9 @@ SwTOXMark::SwTOXMark() ...@@ -98,9 +98,9 @@ SwTOXMark::SwTOXMark()
: SfxPoolItem( RES_TXTATR_TOXMARK ) : SfxPoolItem( RES_TXTATR_TOXMARK )
, SwModify( 0 ) , SwModify( 0 )
, ,
pTextAttr( 0 ), nLevel( 0 ), m_pTextAttr( 0 ), m_nLevel( 0 ),
bAutoGenerated(false), m_bAutoGenerated(false),
bMainEntry(false) m_bMainEntry(false)
{ {
} }
...@@ -108,9 +108,9 @@ SwTOXMark::SwTOXMark( const SwTOXType* pTyp ) ...@@ -108,9 +108,9 @@ SwTOXMark::SwTOXMark( const SwTOXType* pTyp )
: SfxPoolItem( RES_TXTATR_TOXMARK ) : SfxPoolItem( RES_TXTATR_TOXMARK )
, SwModify( const_cast<SwTOXType*>(pTyp) ) , SwModify( const_cast<SwTOXType*>(pTyp) )
, ,
pTextAttr( 0 ), nLevel( 0 ), m_pTextAttr( 0 ), m_nLevel( 0 ),
bAutoGenerated(false), m_bAutoGenerated(false),
bMainEntry(false) m_bMainEntry(false)
{ {
} }
...@@ -118,16 +118,16 @@ SwTOXMark::SwTOXMark( const SwTOXMark& rCopy ) ...@@ -118,16 +118,16 @@ SwTOXMark::SwTOXMark( const SwTOXMark& rCopy )
: SfxPoolItem( RES_TXTATR_TOXMARK ) : SfxPoolItem( RES_TXTATR_TOXMARK )
, SwModify(rCopy.GetRegisteredInNonConst()) , SwModify(rCopy.GetRegisteredInNonConst())
, ,
aPrimaryKey( rCopy.aPrimaryKey ), aSecondaryKey( rCopy.aSecondaryKey ), m_aPrimaryKey( rCopy.m_aPrimaryKey ), m_aSecondaryKey( rCopy.m_aSecondaryKey ),
aTextReading( rCopy.aTextReading ), m_aTextReading( rCopy.m_aTextReading ),
aPrimaryKeyReading( rCopy.aPrimaryKeyReading ), m_aPrimaryKeyReading( rCopy.m_aPrimaryKeyReading ),
aSecondaryKeyReading( rCopy.aSecondaryKeyReading ), m_aSecondaryKeyReading( rCopy.m_aSecondaryKeyReading ),
pTextAttr( 0 ), nLevel( rCopy.nLevel ), m_pTextAttr( 0 ), m_nLevel( rCopy.m_nLevel ),
bAutoGenerated( rCopy.bAutoGenerated), m_bAutoGenerated( rCopy.m_bAutoGenerated),
bMainEntry(rCopy.bMainEntry) m_bMainEntry(rCopy.m_bMainEntry)
{ {
// Copy AlternativString // Copy AlternativString
aAltText = rCopy.aAltText; m_aAltText = rCopy.m_aAltText;
} }
SwTOXMark::~SwTOXMark() SwTOXMark::~SwTOXMark()
...@@ -169,17 +169,17 @@ void SwTOXMark::InvalidateTOXMark() ...@@ -169,17 +169,17 @@ void SwTOXMark::InvalidateTOXMark()
OUString SwTOXMark::GetText() const OUString SwTOXMark::GetText() const
{ {
if( !aAltText.isEmpty() ) if( !m_aAltText.isEmpty() )
return aAltText; return m_aAltText;
if( pTextAttr && pTextAttr->GetpTextNd() ) if( m_pTextAttr && m_pTextAttr->GetpTextNd() )
{ {
const sal_Int32* pEndIdx = pTextAttr->GetEnd(); const sal_Int32* pEndIdx = m_pTextAttr->GetEnd();
OSL_ENSURE( pEndIdx, "TOXMark without mark!"); OSL_ENSURE( pEndIdx, "TOXMark without mark!");
if( pEndIdx ) if( pEndIdx )
{ {
const sal_Int32 nStt = pTextAttr->GetStart(); const sal_Int32 nStt = m_pTextAttr->GetStart();
return pTextAttr->GetpTextNd()->GetExpandText( nStt, *pEndIdx-nStt ); return m_pTextAttr->GetpTextNd()->GetExpandText( nStt, *pEndIdx-nStt );
} }
} }
......
...@@ -30,7 +30,7 @@ SwTextTOXMark::SwTextTOXMark( SwTOXMark& rAttr, ...@@ -30,7 +30,7 @@ SwTextTOXMark::SwTextTOXMark( SwTOXMark& rAttr,
, m_pTextNode( 0 ) , m_pTextNode( 0 )
, m_pEnd( 0 ) , m_pEnd( 0 )
{ {
rAttr.pTextAttr = this; rAttr.m_pTextAttr = this;
if ( rAttr.GetAlternativeText().isEmpty() ) if ( rAttr.GetAlternativeText().isEmpty() )
{ {
m_nEnd = *pEnd; m_nEnd = *pEnd;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment