[Libreoffice-commits] core.git: include/vcl svl/source sw/source writerfilter/source
Miklos Vajna
vmiklos at collabora.co.uk
Fri Jul 13 07:08:13 UTC 2018
include/vcl/pdfread.hxx | 9 +++------
svl/source/items/grabbagitem.cxx | 2 +-
sw/source/filter/html/htmlreqifreader.cxx | 2 +-
sw/source/filter/html/htmlreqifreader.hxx | 2 +-
sw/source/filter/rtf/swparrtf.cxx | 2 +-
sw/source/filter/ww8/docxsdrexport.cxx | 8 +++-----
sw/source/filter/ww8/rtfattributeoutput.cxx | 4 ++--
writerfilter/source/rtftok/rtfsdrimport.cxx | 5 ++---
8 files changed, 14 insertions(+), 20 deletions(-)
New commits:
commit 23793a08b75757c1fe764e3e03e09fe08b72413d
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date: Thu Jul 12 22:09:50 2018 +0200
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 at collabora.co.uk>
diff --git a/include/vcl/pdfread.hxx b/include/vcl/pdfread.hxx
index 0fc3249cd6a3..346c39a3a897 100644
--- a/include/vcl/pdfread.hxx
+++ b/include/vcl/pdfread.hxx
@@ -35,15 +35,12 @@ namespace vcl
VCL_DLLPUBLIC bool ImportPDF(SvStream& rStream, Bitmap& rBitmap, size_t nPageIndex,
css::uno::Sequence<sal_Int8>& rPdfData,
sal_uInt64 nPos = STREAM_SEEK_TO_BEGIN,
- sal_uInt64 nSize = STREAM_SEEK_TO_END,
- const double fResolutionDPI = 96.);
+ sal_uInt64 nSize = STREAM_SEEK_TO_END, double fResolutionDPI = 96.);
-VCL_DLLPUBLIC bool ImportPDF(SvStream& rStream, Graphic& rGraphic,
- const double fResolutionDPI = 96.);
+VCL_DLLPUBLIC bool ImportPDF(SvStream& rStream, Graphic& rGraphic, double fResolutionDPI = 96.);
VCL_DLLPUBLIC size_t ImportPDF(const OUString& rURL, std::vector<Bitmap>& rBitmaps,
- css::uno::Sequence<sal_Int8>& rPdfData,
- const double fResolutionDPI = 96.);
+ css::uno::Sequence<sal_Int8>& rPdfData, double fResolutionDPI = 96.);
}
#endif // INCLUDED_VCL_SOURCE_FILTER_IPDF_PDFREAD_HXX
diff --git a/svl/source/items/grabbagitem.cxx b/svl/source/items/grabbagitem.cxx
index b05b0c7b5f10..b7693dcd68bf 100644
--- a/svl/source/items/grabbagitem.cxx
+++ b/svl/source/items/grabbagitem.cxx
@@ -47,7 +47,7 @@ bool SfxGrabBagItem::PutValue(const uno::Any& rVal, sal_uInt8 /*nMemberId*/)
comphelper::OSequenceIterator<beans::PropertyValue> i(aValue);
while (i.hasMoreElements())
{
- beans::PropertyValue aPropertyValue = i.nextElement().get<beans::PropertyValue>();
+ auto aPropertyValue = i.nextElement().get<beans::PropertyValue>();
m_aMap[aPropertyValue.Name] = aPropertyValue.Value;
}
return true;
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;
}
diff --git a/writerfilter/source/rtftok/rtfsdrimport.cxx b/writerfilter/source/rtftok/rtfsdrimport.cxx
index 272c7e796083..1d3b9527311e 100644
--- a/writerfilter/source/rtftok/rtfsdrimport.cxx
+++ b/writerfilter/source/rtftok/rtfsdrimport.cxx
@@ -165,9 +165,8 @@ void RTFSdrImport::resolveLineColorAndWidth(bool bTextFrame,
= { "TopBorder", "LeftBorder", "BottomBorder", "RightBorder" };
for (const char* pBorder : aBorders)
{
- table::BorderLine2 aBorderLine
- = xPropertySet->getPropertyValue(OUString::createFromAscii(pBorder))
- .get<table::BorderLine2>();
+ auto aBorderLine = xPropertySet->getPropertyValue(OUString::createFromAscii(pBorder))
+ .get<table::BorderLine2>();
if (rLineColor.hasValue())
aBorderLine.Color = rLineColor.get<sal_Int32>();
if (rLineWidth.hasValue())
More information about the Libreoffice-commits
mailing list