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