summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2018-07-12 22:09:50 +0200
committerMiklos Vajna <vmiklos@collabora.co.uk>2018-07-13 09:07:45 +0200
commit23793a08b75757c1fe764e3e03e09fe08b72413d (patch)
tree738d6256fe9cdc02b204f0265bd0bdacf28de2c8 /sw
parent41e2cbc157ce70ea4db67be1a77f61810089b840 (diff)
sw, writerfilter: various small cleanups
Different parameter name in declaration and definition, repeating type name inside the very same line when initializing from a cast, and so on. Change-Id: I52dc29ed845fb1a780dfab586bfd67db0d4a9e54 Reviewed-on: https://gerrit.libreoffice.org/57370 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Diffstat (limited to 'sw')
-rw-r--r--sw/source/filter/html/htmlreqifreader.cxx2
-rw-r--r--sw/source/filter/html/htmlreqifreader.hxx2
-rw-r--r--sw/source/filter/rtf/swparrtf.cxx2
-rw-r--r--sw/source/filter/ww8/docxsdrexport.cxx8
-rw-r--r--sw/source/filter/ww8/rtfattributeoutput.cxx4
5 files changed, 8 insertions, 10 deletions
diff --git a/sw/source/filter/html/htmlreqifreader.cxx b/sw/source/filter/html/htmlreqifreader.cxx
index 234d15aa3964..3b5c2f65f4d9 100644
--- a/sw/source/filter/html/htmlreqifreader.cxx
+++ b/sw/source/filter/html/htmlreqifreader.cxx
@@ -27,7 +27,7 @@ class ReqIfRtfReader : public SvRTFParser
public:
ReqIfRtfReader(SvStream& rStream);
void NextToken(int nToken) override;
- bool WriteObjectData(SvStream& rStream);
+ bool WriteObjectData(SvStream& rOLE);
private:
bool m_bInObjData = false;
diff --git a/sw/source/filter/html/htmlreqifreader.hxx b/sw/source/filter/html/htmlreqifreader.hxx
index 3b24a4f28311..494fdbd0ecc6 100644
--- a/sw/source/filter/html/htmlreqifreader.hxx
+++ b/sw/source/filter/html/htmlreqifreader.hxx
@@ -23,7 +23,7 @@ namespace SwReqIfReader
bool ExtractOleFromRtf(SvStream& rRtf, SvStream& rOle, bool& bOwnFormat);
/// Wraps an OLE2 container binary in an RTF fragment.
-bool WrapOleInRtf(SvStream& rOle, SvStream& rRtf);
+bool WrapOleInRtf(SvStream& rOle2, SvStream& rRtf);
/**
* Wraps an image in an RTF fragment.
diff --git a/sw/source/filter/rtf/swparrtf.cxx b/sw/source/filter/rtf/swparrtf.cxx
index 12060f78fd87..4bfc1212b1a3 100644
--- a/sw/source/filter/rtf/swparrtf.cxx
+++ b/sw/source/filter/rtf/swparrtf.cxx
@@ -92,7 +92,7 @@ ErrCode SwRTFReader::Read(SwDoc& rDoc, const OUString& /*rBaseURL*/, SwPaM& rPam
uno::Any(uno::Reference<io::XStream>(new utl::OStreamWrapper(*m_pStream))) },
{ "InsertMode", uno::Any(true) },
{ "TextInsertModeRange", uno::Any(xInsertTextRange) } }));
- ErrCode ret = ERRCODE_NONE;
+ auto ret = ERRCODE_NONE;
try
{
xFilter->filter(aDescriptor);
diff --git a/sw/source/filter/ww8/docxsdrexport.cxx b/sw/source/filter/ww8/docxsdrexport.cxx
index b714481d0043..eb16418f37fb 100644
--- a/sw/source/filter/ww8/docxsdrexport.cxx
+++ b/sw/source/filter/ww8/docxsdrexport.cxx
@@ -660,7 +660,7 @@ void DocxSdrExport::startDMLAnchorInline(const SwFrameFormat* pFrameFormat, cons
auto it = aGrabBag.find("EG_WrapType");
if (it != aGrabBag.end())
{
- OUString sType = it->second.get<OUString>();
+ auto sType = it->second.get<OUString>();
if (sType == "wrapTight")
nWrapToken = XML_wrapTight;
else if (sType == "wrapThrough")
@@ -677,10 +677,8 @@ void DocxSdrExport::startDMLAnchorInline(const SwFrameFormat* pFrameFormat, cons
{
m_pImpl->m_pSerializer->startElementNS(XML_wp, XML_wrapPolygon, XML_edited, "0",
FSEND);
- drawing::PointSequenceSequence aSeqSeq
- = it->second.get<drawing::PointSequenceSequence>();
- std::vector<awt::Point> aPoints(
- comphelper::sequenceToContainer<std::vector<awt::Point>>(aSeqSeq[0]));
+ auto aSeqSeq = it->second.get<drawing::PointSequenceSequence>();
+ auto aPoints(comphelper::sequenceToContainer<std::vector<awt::Point>>(aSeqSeq[0]));
for (auto i = aPoints.begin(); i != aPoints.end(); ++i)
{
awt::Point& rPoint = *i;
diff --git a/sw/source/filter/ww8/rtfattributeoutput.cxx b/sw/source/filter/ww8/rtfattributeoutput.cxx
index 8aca7d56ede5..662a83680b1c 100644
--- a/sw/source/filter/ww8/rtfattributeoutput.cxx
+++ b/sw/source/filter/ww8/rtfattributeoutput.cxx
@@ -1353,8 +1353,8 @@ void RtfAttributeOutput::NumberingLevel(sal_uInt8 nLevel, sal_uInt16 nStart,
nVal = 35;
if (pOutSet)
{
- const SvxLanguageItem rlang = pOutSet->Get(RES_CHRATR_CJK_LANGUAGE);
- if (LANGUAGE_CHINESE_SIMPLIFIED == rlang.GetLanguage())
+ const SvxLanguageItem& rLang = pOutSet->Get(RES_CHRATR_CJK_LANGUAGE);
+ if (rLang.GetLanguage() == LANGUAGE_CHINESE_SIMPLIFIED)
{
nVal = 39;
}