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

writerfilter, xmlsecurity: various small cleanups

That call in the RTFSprms copy ctor to the parent non-copy ctor was a
bit odd.

Change-Id: Ic219ec22c0b63472766a668406585dbbeebae2f7
Reviewed-on: https://gerrit.libreoffice.org/57763Reviewed-by: 's avatarMiklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins
üst a1dafed3
......@@ -29,7 +29,7 @@ RTFReferenceProperties::~RTFReferenceProperties() = default;
void RTFReferenceProperties::resolve(Properties& rHandler)
{
for (auto& rAttribute : m_aAttributes)
rHandler.attribute(rAttribute.first, *rAttribute.second.get());
rHandler.attribute(rAttribute.first, *rAttribute.second);
for (auto& rSprm : m_aSprms)
{
RTFSprm aSprm(rSprm.first, rSprm.second);
......
......@@ -22,7 +22,7 @@ class RTFReferenceProperties : public writerfilter::Reference<Properties>
public:
RTFReferenceProperties(const RTFSprms& rAttributes, const RTFSprms& rSprms);
explicit RTFReferenceProperties(const RTFSprms& rAttributes);
virtual ~RTFReferenceProperties() override;
~RTFReferenceProperties() override;
void resolve(Properties& rHandler) override;
RTFSprms& getAttributes() { return m_aAttributes; }
RTFSprms& getSprms() { return m_aSprms; }
......
......@@ -24,7 +24,7 @@ public:
using Entries_t = std::map<int, writerfilter::Reference<Properties>::Pointer_t>;
using Entry_t = std::pair<int, writerfilter::Reference<Properties>::Pointer_t>;
explicit RTFReferenceTable(Entries_t aEntries);
virtual ~RTFReferenceTable() override;
~RTFReferenceTable() override;
void resolve(Table& rHandler) override;
private:
......
......@@ -373,7 +373,7 @@ RTFSprms::RTFSprms()
RTFSprms::~RTFSprms() = default;
RTFSprms::RTFSprms(const RTFSprms& rSprms)
: SvRefBase()
: SvRefBase(rSprms)
{
*this = rSprms;
}
......
......@@ -17,7 +17,7 @@ namespace writerfilter
{
namespace rtftok
{
RTFValue::RTFValue(int nValue, OUString sValue, RTFSprms rAttributes, RTFSprms rSprms,
RTFValue::RTFValue(int nValue, OUString sValue, const RTFSprms& rAttributes, const RTFSprms& rSprms,
uno::Reference<drawing::XShape> xShape, uno::Reference<io::XInputStream> xStream,
uno::Reference<embed::XEmbeddedObject> xObject, bool bForceString,
const RTFShape& aShape, const RTFPicture& rPicture)
......@@ -61,7 +61,7 @@ RTFValue::RTFValue(OUString sValue, bool bForce)
{
}
RTFValue::RTFValue(RTFSprms rAttributes)
RTFValue::RTFValue(const RTFSprms& rAttributes)
: m_pAttributes(new RTFSprms(rAttributes))
, m_pSprms(new RTFSprms())
, m_pShape(new RTFShape())
......@@ -69,7 +69,7 @@ RTFValue::RTFValue(RTFSprms rAttributes)
{
}
RTFValue::RTFValue(RTFSprms rAttributes, RTFSprms rSprms)
RTFValue::RTFValue(const RTFSprms& rAttributes, const RTFSprms& rSprms)
: m_pAttributes(new RTFSprms(rAttributes))
, m_pSprms(new RTFSprms(rSprms))
, m_pShape(new RTFShape())
......
......@@ -42,7 +42,7 @@ class RTFValue : public Value
{
public:
using Pointer_t = tools::SvRef<RTFValue>;
RTFValue(int nValue, OUString sValue, RTFSprms rAttributes, RTFSprms rSprms,
RTFValue(int nValue, OUString sValue, const RTFSprms& rAttributes, const RTFSprms& rSprms,
css::uno::Reference<css::drawing::XShape> xShape,
css::uno::Reference<css::io::XInputStream> xStream,
css::uno::Reference<css::embed::XEmbeddedObject> xObject, bool bForceString,
......@@ -50,8 +50,8 @@ public:
RTFValue();
explicit RTFValue(int nValue);
RTFValue(OUString sValue, bool bForce = false);
explicit RTFValue(RTFSprms rAttributes);
RTFValue(RTFSprms rAttributes, RTFSprms rSprms);
explicit RTFValue(const RTFSprms& rAttributes);
RTFValue(const RTFSprms& rAttributes, const RTFSprms& rSprms);
explicit RTFValue(css::uno::Reference<css::drawing::XShape> xShape);
explicit RTFValue(css::uno::Reference<css::io::XInputStream> xStream);
explicit RTFValue(css::uno::Reference<css::embed::XEmbeddedObject> xObject);
......
......@@ -89,9 +89,9 @@ public:
const css::uno::Reference<css::xml::crypto::XXMLSecurityContext>& xSecurityContext,
const OUString& rDescription, sal_Int32& nSecurityId, bool bAdESCompliant,
const OUString& rSignatureLineId = OUString(),
const css::uno::Reference<css::graphic::XGraphic> xValidGraphic
const css::uno::Reference<css::graphic::XGraphic>& xValidGraphic
= css::uno::Reference<css::graphic::XGraphic>(),
const css::uno::Reference<css::graphic::XGraphic> xInvalidGraphic
const css::uno::Reference<css::graphic::XGraphic>& xInvalidGraphic
= css::uno::Reference<css::graphic::XGraphic>());
/// Remove signature at nPosition.
void remove(sal_uInt16 nPosition);
......
......@@ -268,8 +268,8 @@ bool DocumentSignatureManager::add(
const uno::Reference<security::XCertificate>& xCert,
const uno::Reference<xml::crypto::XXMLSecurityContext>& xSecurityContext,
const OUString& rDescription, sal_Int32& nSecurityId, bool bAdESCompliant,
const OUString& rSignatureLineId, const Reference<XGraphic> xValidGraphic,
const Reference<XGraphic> xInvalidGraphic)
const OUString& rSignatureLineId, const Reference<XGraphic>& xValidGraphic,
const Reference<XGraphic>& xInvalidGraphic)
{
if (!xCert.is())
{
......
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