sc/source/filter/excel/xlroot.cxx |    5 -----
 sc/source/filter/inc/xlroot.hxx   |    2 +-
 2 files changed, 1 insertion(+), 6 deletions(-)

New commits:
commit 137f423cc18e23f64b3b2bc6075c5f1581ac6537
Author:     Noel Grandin <noel.gran...@collabora.co.uk>
AuthorDate: Wed May 22 16:40:31 2024 +0200
Commit:     Noel Grandin <noel.gran...@collabora.co.uk>
CommitDate: Fri May 24 20:11:12 2024 +0200

    tdf#161210 speedup loading large XLS (2)
    
    shave 2% off time by inlining GetDoc which is quite hot
    
    Change-Id: I20ede177e6032761598b1b977e90ff969bd2162a
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168012
    Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk>
    Tested-by: Jenkins

diff --git a/sc/source/filter/excel/xlroot.cxx 
b/sc/source/filter/excel/xlroot.cxx
index 836c08b3f5e4..593a4d1583da 100644
--- a/sc/source/filter/excel/xlroot.cxx
+++ b/sc/source/filter/excel/xlroot.cxx
@@ -286,11 +286,6 @@ rtl::Reference<SotStorageStream> XclRoot::OpenStream(const 
OUString& rStrmName)
     return OpenStream( GetRootStorage(), rStrmName );
 }
 
-ScDocument& XclRoot::GetDoc() const
-{
-    return mrData.mrDoc;
-}
-
 ScDocShell* XclRoot::GetDocShell() const
 {
     return GetDoc().GetDocumentShell();
diff --git a/sc/source/filter/inc/xlroot.hxx b/sc/source/filter/inc/xlroot.hxx
index aa86378416b4..603307fb3476 100644
--- a/sc/source/filter/inc/xlroot.hxx
+++ b/sc/source/filter/inc/xlroot.hxx
@@ -198,7 +198,7 @@ public:
     rtl::Reference<SotStorageStream> OpenStream(const OUString& rStrmName) 
const;
 
     /** Returns reference to the destination document (import) or source 
document (export). */
-    ScDocument& GetDoc() const;
+    ScDocument& GetDoc() const { return mrData.mrDoc; }
 
     /** Returns the object shell of the Calc document. May be 0 (i.e. import 
from clipboard). */
     ScDocShell*         GetDocShell() const;

Reply via email to