summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.com>2021-03-29 08:50:50 +0200
committerMiklos Vajna <vmiklos@collabora.com>2021-03-29 11:13:57 +0200
commit965c23e21df1f8b7f2d77db0b35953957f72c04a (patch)
treeb2ecc40b8d46a43ad8348f47dc0da5ef0fb304ac /sw
parent3453f2f8fce9e69cd9f2a2c6f3d7171b6e59f674 (diff)
sw: prefix members of IndexEntrySupplierWrapper, SwDropCapCache, ...
... SwFootnoteSave and XmlPortionDumper See tdf#94879 for motivation. Change-Id: Ibd956314173cfd18e15c7c6b3c75d655bc9adf55 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113292 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
Diffstat (limited to 'sw')
-rw-r--r--sw/inc/toxwrap.hxx6
-rw-r--r--sw/source/core/text/txtdrop.cxx38
-rw-r--r--sw/source/core/text/txtftn.cxx59
-rw-r--r--sw/source/core/text/xmldump.cxx295
-rw-r--r--sw/source/core/tox/toxhlp.cxx12
5 files changed, 229 insertions, 181 deletions
diff --git a/sw/inc/toxwrap.hxx b/sw/inc/toxwrap.hxx
index 63a09b323ff0..9427f9f5eafd 100644
--- a/sw/inc/toxwrap.hxx
+++ b/sw/inc/toxwrap.hxx
@@ -30,14 +30,14 @@ namespace com::sun::star::i18n { class XExtendedIndexEntrySupplier; }
class SW_DLLPUBLIC IndexEntrySupplierWrapper
{
- css::lang::Locale aLcl;
- css::uno::Reference < css::i18n::XExtendedIndexEntrySupplier > xIES;
+ css::lang::Locale m_aLcl;
+ css::uno::Reference < css::i18n::XExtendedIndexEntrySupplier > m_xIES;
public:
IndexEntrySupplierWrapper();
~IndexEntrySupplierWrapper();
- void SetLocale( const css::lang::Locale& rLocale ) { aLcl = rLocale; }
+ void SetLocale( const css::lang::Locale& rLocale ) { m_aLcl = rLocale; }
OUString GetIndexKey( const OUString& rText, const OUString& rTextReading,
const css::lang::Locale& rLocale ) const;
diff --git a/sw/source/core/text/txtdrop.cxx b/sw/source/core/text/txtdrop.cxx
index ecd0e19c233c..312eb4dd71ba 100644
--- a/sw/source/core/text/txtdrop.cxx
+++ b/sw/source/core/text/txtdrop.cxx
@@ -696,12 +696,12 @@ void SwTextPainter::PaintDropPortion()
class SwDropCapCache
{
- const void* aFontCacheId[ DROP_CACHE_SIZE ] = {};
- OUString aText[ DROP_CACHE_SIZE ];
- sal_uInt16 aFactor[ DROP_CACHE_SIZE ];
- sal_uInt16 aWishedHeight[ DROP_CACHE_SIZE ] = {};
- short aDescent[ DROP_CACHE_SIZE ];
- sal_uInt16 nIndex = 0;
+ const void* m_aFontCacheId[ DROP_CACHE_SIZE ] = {};
+ OUString m_aText[ DROP_CACHE_SIZE ];
+ sal_uInt16 m_aFactor[ DROP_CACHE_SIZE ];
+ sal_uInt16 m_aWishedHeight[ DROP_CACHE_SIZE ] = {};
+ short m_aDescent[ DROP_CACHE_SIZE ];
+ sal_uInt16 m_nIndex = 0;
public:
SwDropCapCache() = default;
void CalcFontSize( SwDropPortion* pDrop, SwTextFormatInfo &rInf );
@@ -736,8 +736,8 @@ void SwDropCapCache::CalcFontSize( SwDropPortion* pDrop, SwTextFormatInfo &rInf
nTmpIdx = 0;
while( nTmpIdx < DROP_CACHE_SIZE &&
- ( aText[ nTmpIdx ] != aStr || aFontCacheId[ nTmpIdx ] != nFntCacheId ||
- aWishedHeight[ nTmpIdx ] != pDrop->GetDropHeight() ) )
+ ( m_aText[ nTmpIdx ] != aStr || m_aFontCacheId[ nTmpIdx ] != nFntCacheId ||
+ m_aWishedHeight[ nTmpIdx ] != pDrop->GetDropHeight() ) )
++nTmpIdx;
}
@@ -747,9 +747,9 @@ void SwDropCapCache::CalcFontSize( SwDropPortion* pDrop, SwTextFormatInfo &rInf
// consists of more than one part
if( nTmpIdx >= DROP_CACHE_SIZE || ! bUseCache )
{
- ++nIndex;
- nIndex %= DROP_CACHE_SIZE;
- nTmpIdx = nIndex;
+ ++m_nIndex;
+ m_nIndex %= DROP_CACHE_SIZE;
+ nTmpIdx = m_nIndex;
tools::Long nWishedHeight = pDrop->GetDropHeight();
tools::Long nAscent = 0;
@@ -771,11 +771,11 @@ void SwDropCapCache::CalcFontSize( SwDropPortion* pDrop, SwTextFormatInfo &rInf
if ( bUseCache )
{
// save keys for cache
- aFontCacheId[ nTmpIdx ] = nFntCacheId;
- aText[ nTmpIdx ] = aStr;
- aWishedHeight[ nTmpIdx ] = sal_uInt16(nWishedHeight);
+ m_aFontCacheId[ nTmpIdx ] = nFntCacheId;
+ m_aText[ nTmpIdx ] = aStr;
+ m_aWishedHeight[ nTmpIdx ] = sal_uInt16(nWishedHeight);
// save initial scaling factor
- aFactor[ nTmpIdx ] = static_cast<sal_uInt16>(nFactor);
+ m_aFactor[ nTmpIdx ] = static_cast<sal_uInt16>(nFactor);
}
bool bGrow = (pDrop->GetLen() != TextFrameIndex(0));
@@ -925,7 +925,7 @@ void SwDropCapCache::CalcFontSize( SwDropPortion* pDrop, SwTextFormatInfo &rInf
else
{
if ( bUseCache )
- aFactor[ nTmpIdx ] = static_cast<sal_uInt16>(nFactor);
+ m_aFactor[ nTmpIdx ] = static_cast<sal_uInt16>(nFactor);
nMin = nFactor;
}
@@ -949,7 +949,7 @@ void SwDropCapCache::CalcFontSize( SwDropPortion* pDrop, SwTextFormatInfo &rInf
}
if ( bUseCache )
- aDescent[ nTmpIdx ] = -short( nDescent );
+ m_aDescent[ nTmpIdx ] = -short( nDescent );
}
pCurrPart = pDrop->GetPart();
@@ -957,8 +957,8 @@ void SwDropCapCache::CalcFontSize( SwDropPortion* pDrop, SwTextFormatInfo &rInf
// did made any new calculations or did we use the cache?
if ( -1 == nFactor )
{
- nFactor = aFactor[ nTmpIdx ];
- nDescent = aDescent[ nTmpIdx ];
+ nFactor = m_aFactor[ nTmpIdx ];
+ nDescent = m_aDescent[ nTmpIdx ];
}
else
nDescent = -nDescent;
diff --git a/sw/source/core/text/txtftn.cxx b/sw/source/core/text/txtftn.cxx
index fca024db0e9a..5b4b9f7492e0 100644
--- a/sw/source/core/text/txtftn.cxx
+++ b/sw/source/core/text/txtftn.cxx
@@ -1253,9 +1253,9 @@ namespace {
class SwFootnoteSave
{
- SwTextSizeInfo *pInf;
- SwFont *pFnt;
- std::unique_ptr<SwFont> pOld;
+ SwTextSizeInfo* m_pInf;
+ SwFont* m_pFnt;
+ std::unique_ptr<SwFont> m_pOld;
SwFootnoteSave(const SwFootnoteSave&) = delete;
SwFootnoteSave& operator=(const SwFootnoteSave&) = delete;
@@ -1270,32 +1270,31 @@ public:
}
-SwFootnoteSave::SwFootnoteSave( const SwTextSizeInfo &rInf,
- const SwTextFootnote* pTextFootnote,
- const bool bApplyGivenScriptType,
- const SwFontScript nGivenScriptType )
- : pInf( &const_cast<SwTextSizeInfo&>(rInf) )
- , pFnt( nullptr )
+SwFootnoteSave::SwFootnoteSave(const SwTextSizeInfo& rInf, const SwTextFootnote* pTextFootnote,
+ const bool bApplyGivenScriptType,
+ const SwFontScript nGivenScriptType)
+ : m_pInf(&const_cast<SwTextSizeInfo&>(rInf))
+ , m_pFnt(nullptr)
{
if( pTextFootnote && rInf.GetTextFrame() )
{
- pFnt = const_cast<SwTextSizeInfo&>(rInf).GetFont();
- pOld.reset( new SwFont( *pFnt ) );
- pOld->GetTox() = pFnt->GetTox();
- pFnt->GetTox() = 0;
+ m_pFnt = const_cast<SwTextSizeInfo&>(rInf).GetFont();
+ m_pOld.reset(new SwFont(*m_pFnt));
+ m_pOld->GetTox() = m_pFnt->GetTox();
+ m_pFnt->GetTox() = 0;
SwFormatFootnote& rFootnote = const_cast<SwFormatFootnote&>(pTextFootnote->GetFootnote());
const SwDoc *const pDoc = &rInf.GetTextFrame()->GetDoc();
// #i98418#
if ( bApplyGivenScriptType )
{
- pFnt->SetActual( nGivenScriptType );
+ m_pFnt->SetActual(nGivenScriptType);
}
else
{
// examine text and set script
OUString aTmpStr(rFootnote.GetViewNumStr(*pDoc, rInf.GetTextFrame()->getRootFrame()));
- pFnt->SetActual( SwScriptInfo::WhichFont(0, aTmpStr) );
+ m_pFnt->SetActual(SwScriptInfo::WhichFont(0, aTmpStr));
}
const SwEndNoteInfo* pInfo;
@@ -1304,43 +1303,41 @@ SwFootnoteSave::SwFootnoteSave( const SwTextSizeInfo &rInf,
else
pInfo = &pDoc->GetFootnoteInfo();
const SwAttrSet& rSet = pInfo->GetAnchorCharFormat(const_cast<SwDoc&>(*pDoc))->GetAttrSet();
- pFnt->SetDiffFnt( &rSet, &pDoc->getIDocumentSettingAccess() );
+ m_pFnt->SetDiffFnt(&rSet, &pDoc->getIDocumentSettingAccess());
// we reduce footnote size, if we are inside a double line portion
- if ( ! pOld->GetEscapement() && 50 == pOld->GetPropr() )
+ if (!m_pOld->GetEscapement() && 50 == m_pOld->GetPropr())
{
- Size aSize = pFnt->GetSize( pFnt->GetActual() );
- pFnt->SetSize( Size( aSize.Width() / 2,
- aSize.Height() / 2 ),
- pFnt->GetActual() );
+ Size aSize = m_pFnt->GetSize(m_pFnt->GetActual());
+ m_pFnt->SetSize(Size(aSize.Width() / 2, aSize.Height() / 2), m_pFnt->GetActual());
}
// set the correct rotation at the footnote font
const SfxPoolItem* pItem;
if( SfxItemState::SET == rSet.GetItemState( RES_CHRATR_ROTATE,
true, &pItem ))
- pFnt->SetVertical( static_cast<const SvxCharRotateItem*>(pItem)->GetValue(),
- rInf.GetTextFrame()->IsVertical() );
+ m_pFnt->SetVertical(static_cast<const SvxCharRotateItem*>(pItem)->GetValue(),
+ rInf.GetTextFrame()->IsVertical());
- pFnt->ChgPhysFnt( pInf->GetVsh(), *pInf->GetOut() );
+ m_pFnt->ChgPhysFnt(m_pInf->GetVsh(), *m_pInf->GetOut());
if( SfxItemState::SET == rSet.GetItemState( RES_CHRATR_BACKGROUND,
true, &pItem ))
- pFnt->SetBackColor( static_cast<const SvxBrushItem*>(pItem)->GetColor() );
+ m_pFnt->SetBackColor(static_cast<const SvxBrushItem*>(pItem)->GetColor());
}
else
- pFnt = nullptr;
+ m_pFnt = nullptr;
}
SwFootnoteSave::~SwFootnoteSave() COVERITY_NOEXCEPT_FALSE
{
- if( pFnt )
+ if (m_pFnt)
{
// Put back SwFont
- *pFnt = *pOld;
- pFnt->GetTox() = pOld->GetTox();
- pFnt->ChgPhysFnt( pInf->GetVsh(), *pInf->GetOut() );
- pOld.reset();
+ *m_pFnt = *m_pOld;
+ m_pFnt->GetTox() = m_pOld->GetTox();
+ m_pFnt->ChgPhysFnt(m_pInf->GetVsh(), *m_pInf->GetOut());
+ m_pOld.reset();
}
}
diff --git a/sw/source/core/text/xmldump.cxx b/sw/source/core/text/xmldump.cxx
index 3f719548f937..973df48ea1a6 100644
--- a/sw/source/core/text/xmldump.cxx
+++ b/sw/source/core/text/xmldump.cxx
@@ -32,88 +32,141 @@ namespace {
class XmlPortionDumper:public SwPortionHandler
{
private:
- xmlTextWriterPtr writer;
- TextFrameIndex ofs;
- const OUString& m_rText;
- OUString m_aLine;
-
- static const char* getTypeName( PortionType nType )
- {
- switch ( nType )
- {
- case PortionType::NONE: return "PortionType::NONE";
- case PortionType::FlyCnt: return "PortionType::FlyCnt";
-
- case PortionType::Hole: return "PortionType::Hole";
- case PortionType::TempEnd: return "PortionType::TempEnd";
- case PortionType::Break: return "PortionType::Break";
- case PortionType::Kern: return "PortionType::Kern";
- case PortionType::Arrow: return "PortionType::Arrow";
- case PortionType::Multi: return "PortionType::Multi";
- case PortionType::HiddenText: return "PortionType::HiddenText";
- case PortionType::ControlChar: return "PortionType::ControlChar";
- case PortionType::Bookmark: return "PortionType::Bookmark";
-
- case PortionType::Text: return "PortionType::Text";
- case PortionType::Lay: return "PortionType::Lay";
- case PortionType::Para: return "PortionType::Para";
- case PortionType::Hanging: return "PortionType::Hanging";
-
- case PortionType::Drop: return "PortionType::Drop";
- case PortionType::Tox: return "PortionType::Tox";
- case PortionType::IsoTox: return "PortionType::IsoTox";
- case PortionType::Ref: return "PortionType::Ref";
- case PortionType::IsoRef: return "PortionType::IsoRef";
- case PortionType::Meta: return "PortionType::Meta";
- case PortionType::FieldMark: return "PortionType::FieldMark";
- case PortionType::FieldFormCheckbox: return "PortionType::FieldFormCheckbox";
- case PortionType::InputField: return "PortionType::InputField";
-
- case PortionType::Expand: return "PortionType::Expand";
- case PortionType::Blank: return "PortionType::Blank";
- case PortionType::PostIts: return "PortionType::PostIts";
-
- case PortionType::Hyphen: return "PortionType::Hyphen";
- case PortionType::HyphenStr: return "PortionType::HyphenStr";
- case PortionType::SoftHyphen: return "PortionType::SoftHyphen";
- case PortionType::SoftHyphenStr: return "PortionType::SoftHyphenStr";
- case PortionType::SoftHyphenComp: return "PortionType::SoftHyphenComp";
-
- case PortionType::Field: return "PortionType::Field";
- case PortionType::Hidden: return "PortionType::Hidden";
- case PortionType::QuoVadis: return "PortionType::QuoVadis";
- case PortionType::ErgoSum: return "PortionType::ErgoSum";
- case PortionType::Combined: return "PortionType::Combined";
- case PortionType::Footnote: return "PortionType::Footnote";
-
- case PortionType::FootnoteNum: return "PortionType::FootnoteNum";
- case PortionType::Number: return "PortionType::Number";
- case PortionType::Bullet: return "PortionType::Bullet";
- case PortionType::GrfNum: return "PortionType::GrfNum";
-
- case PortionType::Glue: return "PortionType::Glue";
-
- case PortionType::Margin: return "PortionType::Margin";
-
- case PortionType::Fix: return "PortionType::Fix";
- case PortionType::Fly: return "PortionType::Fly";
-
- case PortionType::Table: return "PortionType::Table";
-
- case PortionType::TabRight: return "PortionType::TabRight";
- case PortionType::TabCenter: return "PortionType::TabCenter";
- case PortionType::TabDecimal: return "PortionType::TabDecimal";
-
- case PortionType::TabLeft: return "PortionType::TabLeft";
- default:
- return "Unknown";
- }
+ xmlTextWriterPtr m_Writer;
+ TextFrameIndex m_Ofs;
+ const OUString& m_rText;
+ OUString m_aLine;
+
+ static const char* getTypeName(PortionType nType)
+ {
+ switch (nType)
+ {
+ case PortionType::NONE:
+ return "PortionType::NONE";
+ case PortionType::FlyCnt:
+ return "PortionType::FlyCnt";
+
+ case PortionType::Hole:
+ return "PortionType::Hole";
+ case PortionType::TempEnd:
+ return "PortionType::TempEnd";
+ case PortionType::Break:
+ return "PortionType::Break";
+ case PortionType::Kern:
+ return "PortionType::Kern";
+ case PortionType::Arrow:
+ return "PortionType::Arrow";
+ case PortionType::Multi:
+ return "PortionType::Multi";
+ case PortionType::HiddenText:
+ return "PortionType::HiddenText";
+ case PortionType::ControlChar:
+ return "PortionType::ControlChar";
+ case PortionType::Bookmark:
+ return "PortionType::Bookmark";
+
+ case PortionType::Text:
+ return "PortionType::Text";
+ case PortionType::Lay:
+ return "PortionType::Lay";
+ case PortionType::Para:
+ return "PortionType::Para";
+ case PortionType::Hanging:
+ return "PortionType::Hanging";
+
+ case PortionType::Drop:
+ return "PortionType::Drop";
+ case PortionType::Tox:
+ return "PortionType::Tox";
+ case PortionType::IsoTox:
+ return "PortionType::IsoTox";
+ case PortionType::Ref:
+ return "PortionType::Ref";
+ case PortionType::IsoRef:
+ return "PortionType::IsoRef";
+ case PortionType::Meta:
+ return "PortionType::Meta";
+ case PortionType::FieldMark:
+ return "PortionType::FieldMark";
+ case PortionType::FieldFormCheckbox:
+ return "PortionType::FieldFormCheckbox";
+ case PortionType::InputField:
+ return "PortionType::InputField";
+
+ case PortionType::Expand:
+ return "PortionType::Expand";
+ case PortionType::Blank:
+ return "PortionType::Blank";
+ case PortionType::PostIts:
+ return "PortionType::PostIts";
+
+ case PortionType::Hyphen:
+ return "PortionType::Hyphen";
+ case PortionType::HyphenStr:
+ return "PortionType::HyphenStr";
+ case PortionType::SoftHyphen:
+ return "PortionType::SoftHyphen";
+ case PortionType::SoftHyphenStr:
+ return "PortionType::SoftHyphenStr";
+ case PortionType::SoftHyphenComp:
+ return "PortionType::SoftHyphenComp";
+
+ case PortionType::Field:
+ return "PortionType::Field";
+ case PortionType::Hidden:
+ return "PortionType::Hidden";
+ case PortionType::QuoVadis:
+ return "PortionType::QuoVadis";
+ case PortionType::ErgoSum:
+ return "PortionType::ErgoSum";
+ case PortionType::Combined:
+ return "PortionType::Combined";
+ case PortionType::Footnote:
+ return "PortionType::Footnote";
+
+ case PortionType::FootnoteNum:
+ return "PortionType::FootnoteNum";
+ case PortionType::Number:
+ return "PortionType::Number";
+ case PortionType::Bullet:
+ return "PortionType::Bullet";
+ case PortionType::GrfNum:
+ return "PortionType::GrfNum";
+
+ case PortionType::Glue:
+ return "PortionType::Glue";
+
+ case PortionType::Margin:
+ return "PortionType::Margin";
+
+ case PortionType::Fix:
+ return "PortionType::Fix";
+ case PortionType::Fly:
+ return "PortionType::Fly";
+
+ case PortionType::Table:
+ return "PortionType::Table";
+
+ case PortionType::TabRight:
+ return "PortionType::TabRight";
+ case PortionType::TabCenter:
+ return "PortionType::TabCenter";
+ case PortionType::TabDecimal:
+ return "PortionType::TabDecimal";
+
+ case PortionType::TabLeft:
+ return "PortionType::TabLeft";
+ default:
+ return "Unknown";
+ }
}
public:
-
- explicit XmlPortionDumper( xmlTextWriterPtr some_writer, const OUString& rText ):writer( some_writer ), ofs( 0 ), m_rText(rText)
- {
+ explicit XmlPortionDumper(xmlTextWriterPtr some_writer, const OUString& rText)
+ : m_Writer(some_writer)
+ , m_Ofs(0)
+ , m_rText(rText)
+ {
}
/**
@@ -127,24 +180,25 @@ class XmlPortionDumper:public SwPortionHandler
sal_Int32 nHeight,
sal_Int32 nWidth) override
{
- (void)xmlTextWriterStartElement( writer, BAD_CAST( "Text" ) );
- (void)xmlTextWriterWriteFormatAttribute( writer,
- BAD_CAST( "nLength" ),
- "%i", static_cast<int>(static_cast<sal_Int32>(nLength)) );
- (void)xmlTextWriterWriteFormatAttribute( writer,
- BAD_CAST( "nType" ),
- "%s", getTypeName( nType ) );
+ (void)xmlTextWriterStartElement(m_Writer, BAD_CAST("Text"));
+ (void)xmlTextWriterWriteFormatAttribute(m_Writer, BAD_CAST("nLength"), "%i",
+ static_cast<int>(static_cast<sal_Int32>(nLength)));
+ (void)xmlTextWriterWriteFormatAttribute(m_Writer, BAD_CAST("nType"), "%s",
+ getTypeName(nType));
if (nHeight > 0)
- (void)xmlTextWriterWriteFormatAttribute(writer, BAD_CAST("nHeight"), "%i", static_cast<int>(nHeight));
+ (void)xmlTextWriterWriteFormatAttribute(m_Writer, BAD_CAST("nHeight"), "%i",
+ static_cast<int>(nHeight));
if (nWidth > 0)
- (void)xmlTextWriterWriteFormatAttribute(writer, BAD_CAST("nWidth"), "%i", static_cast<int>(nWidth));
+ (void)xmlTextWriterWriteFormatAttribute(m_Writer, BAD_CAST("nWidth"), "%i",
+ static_cast<int>(nWidth));
if (nLength > TextFrameIndex(0))
- (void)xmlTextWriterWriteAttribute(writer, BAD_CAST("Portion"),
- BAD_CAST(m_rText.copy(sal_Int32(ofs), sal_Int32(nLength)).toUtf8().getStr()));
+ (void)xmlTextWriterWriteAttribute(
+ m_Writer, BAD_CAST("Portion"),
+ BAD_CAST(m_rText.copy(sal_Int32(m_Ofs), sal_Int32(nLength)).toUtf8().getStr()));
- (void)xmlTextWriterEndElement( writer );
- m_aLine += m_rText.subView(sal_Int32(ofs), sal_Int32(nLength));
- ofs += nLength;
+ (void)xmlTextWriterEndElement(m_Writer);
+ m_aLine += m_rText.subView(sal_Int32(m_Ofs), sal_Int32(nLength));
+ m_Ofs += nLength;
}
/**
@@ -164,45 +218,43 @@ class XmlPortionDumper:public SwPortionHandler
sal_Int32 nWidth,
const SwFont* pFont ) override
{
- (void)xmlTextWriterStartElement( writer, BAD_CAST( "Special" ) );
- (void)xmlTextWriterWriteFormatAttribute( writer,
- BAD_CAST( "nLength" ),
- "%i", static_cast<int>(static_cast<sal_Int32>(nLength)) );
- (void)xmlTextWriterWriteFormatAttribute( writer,
- BAD_CAST( "nType" ),
- "%s", getTypeName( nType ) );
+ (void)xmlTextWriterStartElement(m_Writer, BAD_CAST("Special"));
+ (void)xmlTextWriterWriteFormatAttribute(m_Writer, BAD_CAST("nLength"), "%i",
+ static_cast<int>(static_cast<sal_Int32>(nLength)));
+ (void)xmlTextWriterWriteFormatAttribute(m_Writer, BAD_CAST("nType"), "%s",
+ getTypeName(nType));
OString sText8 = OUStringToOString( rText, RTL_TEXTENCODING_UTF8 );
- (void)xmlTextWriterWriteFormatAttribute( writer, BAD_CAST( "rText" ),
- "%s", sText8.getStr( ) );
+ (void)xmlTextWriterWriteFormatAttribute(m_Writer, BAD_CAST("rText"), "%s", sText8.getStr());
if (nHeight > 0)
- (void)xmlTextWriterWriteFormatAttribute(writer, BAD_CAST("nHeight"), "%i", static_cast<int>(nHeight));
+ (void)xmlTextWriterWriteFormatAttribute(m_Writer, BAD_CAST("nHeight"), "%i",
+ static_cast<int>(nHeight));
if (nWidth > 0)
- (void)xmlTextWriterWriteFormatAttribute(writer, BAD_CAST("nWidth"), "%i", static_cast<int>(nWidth));
+ (void)xmlTextWriterWriteFormatAttribute(m_Writer, BAD_CAST("nWidth"), "%i",
+ static_cast<int>(nWidth));
if (pFont)
- pFont->dumpAsXml(writer);
+ pFont->dumpAsXml(m_Writer);
- (void)xmlTextWriterEndElement( writer );
+ (void)xmlTextWriterEndElement(m_Writer);
m_aLine += rText;
- ofs += nLength;
+ m_Ofs += nLength;
}
virtual void LineBreak( sal_Int32 nWidth ) override
{
- (void)xmlTextWriterStartElement( writer, BAD_CAST( "LineBreak" ) );
+ (void)xmlTextWriterStartElement(m_Writer, BAD_CAST("LineBreak"));
if (nWidth > 0)
- (void)xmlTextWriterWriteFormatAttribute( writer,
- BAD_CAST( "nWidth" ),
- "%i", static_cast<int>(nWidth) );
+ (void)xmlTextWriterWriteFormatAttribute(m_Writer, BAD_CAST("nWidth"), "%i",
+ static_cast<int>(nWidth));
if (!m_aLine.isEmpty())
{
- (void)xmlTextWriterWriteAttribute(writer, BAD_CAST("Line"),
- BAD_CAST(m_aLine.toUtf8().getStr()));
+ (void)xmlTextWriterWriteAttribute(m_Writer, BAD_CAST("Line"),
+ BAD_CAST(m_aLine.toUtf8().getStr()));
m_aLine.clear();
}
- (void)xmlTextWriterEndElement( writer );
+ (void)xmlTextWriterEndElement(m_Writer);
}
/**
@@ -211,18 +263,17 @@ class XmlPortionDumper:public SwPortionHandler
*/
virtual void Skip( TextFrameIndex nLength ) override
{
- (void)xmlTextWriterStartElement( writer, BAD_CAST( "Skip" ) );
- (void)xmlTextWriterWriteFormatAttribute( writer,
- BAD_CAST( "nLength" ),
- "%i", static_cast<int>(static_cast<sal_Int32>(nLength)) );
- (void)xmlTextWriterEndElement( writer );
- ofs += nLength;
+ (void)xmlTextWriterStartElement(m_Writer, BAD_CAST("Skip"));
+ (void)xmlTextWriterWriteFormatAttribute(m_Writer, BAD_CAST("nLength"), "%i",
+ static_cast<int>(static_cast<sal_Int32>(nLength)));
+ (void)xmlTextWriterEndElement(m_Writer);
+ m_Ofs += nLength;
}
virtual void Finish( ) override
{
- (void)xmlTextWriterStartElement( writer, BAD_CAST( "Finish" ) );
- (void)xmlTextWriterEndElement( writer );
+ (void)xmlTextWriterStartElement(m_Writer, BAD_CAST("Finish"));
+ (void)xmlTextWriterEndElement(m_Writer);
}
};
diff --git a/sw/source/core/tox/toxhlp.cxx b/sw/source/core/tox/toxhlp.cxx
index b318b54c182a..6acff739906c 100644
--- a/sw/source/core/tox/toxhlp.cxx
+++ b/sw/source/core/tox/toxhlp.cxx
@@ -29,7 +29,7 @@ IndexEntrySupplierWrapper::IndexEntrySupplierWrapper()
uno::Reference< uno::XComponentContext > xContext = ::comphelper::getProcessComponentContext();
try {
- xIES = i18n::IndexEntrySupplier::create(xContext);
+ m_xIES = i18n::IndexEntrySupplier::create(xContext);
}
catch (const uno::Exception&)
{
@@ -47,7 +47,7 @@ OUString IndexEntrySupplierWrapper::GetIndexKey( const OUString& rText,
{
OUString sRet;
try {
- sRet = xIES->getIndexKey( rText, rTextReading, rLocale );
+ sRet = m_xIES->getIndexKey( rText, rTextReading, rLocale );
}
catch (const uno::Exception&)
{
@@ -60,7 +60,7 @@ OUString IndexEntrySupplierWrapper::GetFollowingText( bool bMorePages ) const
{
OUString sRet;
try {
- sRet = xIES->getIndexFollowPageWord( bMorePages, aLcl );
+ sRet = m_xIES->getIndexFollowPageWord( bMorePages, m_aLcl );
}
catch (const uno::Exception&)
{
@@ -74,7 +74,7 @@ css::uno::Sequence< OUString > IndexEntrySupplierWrapper::GetAlgorithmList( cons
uno::Sequence< OUString > sRet;
try {
- sRet = xIES->getAlgorithmList( rLcl );
+ sRet = m_xIES->getAlgorithmList( rLcl );
}
catch (const uno::Exception&)
{
@@ -89,7 +89,7 @@ bool IndexEntrySupplierWrapper::LoadAlgorithm(
{
bool bRet = false;
try {
- bRet = xIES->loadAlgorithm( rLcl, sSortAlgorithm, nOptions );
+ bRet = m_xIES->loadAlgorithm( rLcl, sSortAlgorithm, nOptions );
}
catch (const uno::Exception&)
{
@@ -106,7 +106,7 @@ sal_Int16 IndexEntrySupplierWrapper::CompareIndexEntry(
{
sal_Int16 nRet = 0;
try {
- nRet = xIES->compareIndexEntry( rText1, rTextReading1, rLocale1,
+ nRet = m_xIES->compareIndexEntry( rText1, rTextReading1, rLocale1,
rText2, rTextReading2, rLocale2 );
}
catch (const uno::Exception&)