[Libreoffice-commits] core.git: include/vcl include/xmloff vcl/source writerfilter/source xmloff/source

Stephan Bergmann (via logerrit) logerrit at kemper.freedesktop.org
Thu Dec 3 19:52:42 UTC 2020


 include/vcl/embeddedfontshelper.hxx       |    2 +-
 include/xmloff/xmlimp.hxx                 |    2 +-
 vcl/source/gdi/embeddedfontshelper.cxx    |    2 +-
 writerfilter/source/dmapper/FontTable.cxx |    2 +-
 writerfilter/source/dmapper/FontTable.hxx |    2 +-
 xmloff/source/core/xmlimp.cxx             |    2 +-
 6 files changed, 6 insertions(+), 6 deletions(-)

New commits:
commit f175e06755db64ecfb706d5d86ef17c4197c0571
Author:     Stephan Bergmann <sbergman at redhat.com>
AuthorDate: Thu Dec 3 16:31:17 2020 +0100
Commit:     Stephan Bergmann <sbergman at redhat.com>
CommitDate: Thu Dec 3 20:51:56 2020 +0100

    Pass key by const& to the various addEmbeddedFont functions
    
    Change-Id: Id6e36a4acf34a6b8d5b7202231650066ae6cb6cd
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107170
    Tested-by: Jenkins
    Reviewed-by: Stephan Bergmann <sbergman at redhat.com>

diff --git a/include/vcl/embeddedfontshelper.hxx b/include/vcl/embeddedfontshelper.hxx
index 7f8c1f3094cf..a54785ea59eb 100644
--- a/include/vcl/embeddedfontshelper.hxx
+++ b/include/vcl/embeddedfontshelper.hxx
@@ -63,7 +63,7 @@ public:
     */
     bool addEmbeddedFont( const css::uno::Reference< css::io::XInputStream >& stream,
         const OUString& fontName, const char* extra,
-        std::vector< unsigned char > key, bool eot = false);
+        std::vector< unsigned char > const & key, bool eot = false);
 
     /**
       Returns a URL for a file where to store contents of a given temporary font.
diff --git a/include/xmloff/xmlimp.hxx b/include/xmloff/xmlimp.hxx
index 674a535c5d7f..ae165a2201b8 100644
--- a/include/xmloff/xmlimp.hxx
+++ b/include/xmloff/xmlimp.hxx
@@ -585,7 +585,7 @@ public:
     // see EmbeddedFontsHelper::addEmbeddedFont
     bool addEmbeddedFont( const css::uno::Reference< css::io::XInputStream >& stream,
         const OUString& fontName, const char* extra,
-        std::vector< unsigned char > key, bool eot);
+        std::vector< unsigned char > const & key, bool eot);
 
     virtual void NotifyContainsEmbeddedFont() {}
 
diff --git a/vcl/source/gdi/embeddedfontshelper.cxx b/vcl/source/gdi/embeddedfontshelper.cxx
index 431c140422ce..3b929be452c3 100644
--- a/vcl/source/gdi/embeddedfontshelper.cxx
+++ b/vcl/source/gdi/embeddedfontshelper.cxx
@@ -64,7 +64,7 @@ void EmbeddedFontsHelper::clearTemporaryFontFiles()
 }
 
 bool EmbeddedFontsHelper::addEmbeddedFont( const uno::Reference< io::XInputStream >& stream, const OUString& fontName,
-    const char* extra, std::vector< unsigned char > key, bool eot )
+    const char* extra, std::vector< unsigned char > const & key, bool eot )
 {
     OUString fileUrl = EmbeddedFontsHelper::fileUrlForTemporaryFont( fontName, extra );
     osl::File file( fileUrl );
diff --git a/writerfilter/source/dmapper/FontTable.cxx b/writerfilter/source/dmapper/FontTable.cxx
index 2dd7b3d91221..7973a42938ec 100644
--- a/writerfilter/source/dmapper/FontTable.cxx
+++ b/writerfilter/source/dmapper/FontTable.cxx
@@ -226,7 +226,7 @@ sal_uInt32 FontTable::size()
 
 bool FontTable::addEmbeddedFont(const css::uno::Reference<css::io::XInputStream>& stream,
                                 const OUString& fontName, const char* extra,
-                                std::vector<unsigned char> key)
+                                std::vector<unsigned char> const & key)
 {
     if (!m_pImpl->xEmbeddedFontHelper)
         m_pImpl->xEmbeddedFontHelper.reset(new EmbeddedFontsHelper);
diff --git a/writerfilter/source/dmapper/FontTable.hxx b/writerfilter/source/dmapper/FontTable.hxx
index 1569ebf56e48..1276eaa8d705 100644
--- a/writerfilter/source/dmapper/FontTable.hxx
+++ b/writerfilter/source/dmapper/FontTable.hxx
@@ -54,7 +54,7 @@ class FontTable : public LoggedProperties, public LoggedTable
 
     bool addEmbeddedFont(const css::uno::Reference<css::io::XInputStream>& stream,
                          const OUString& fontName, const char* extra,
-                         std::vector<unsigned char> key);
+                         std::vector<unsigned char> const & key);
 
  private:
     // Properties
diff --git a/xmloff/source/core/xmlimp.cxx b/xmloff/source/core/xmlimp.cxx
index e96e65072ead..5178cd732b05 100644
--- a/xmloff/source/core/xmlimp.cxx
+++ b/xmloff/source/core/xmlimp.cxx
@@ -450,7 +450,7 @@ SvXMLImport::~SvXMLImport() throw ()
 
 bool SvXMLImport::addEmbeddedFont(const css::uno::Reference< css::io::XInputStream >& stream,
                                   const OUString& fontName, const char* extra,
-                                  std::vector<unsigned char> key, bool eot)
+                                  std::vector<unsigned char> const & key, bool eot)
 {
     if (!mxEmbeddedFontHelper)
         mxEmbeddedFontHelper.reset(new EmbeddedFontsHelper);


More information about the Libreoffice-commits mailing list