[PATCH] Only call getScDocument when needed

Marcos Souza (via Code Review) gerrit at gerrit.libreoffice.org
Fri Jan 25 01:21:00 PST 2013


Hi,

I have submitted a patch for review:

    https://gerrit.libreoffice.org/1861

To pull it, you can do:

    git pull ssh://gerrit.libreoffice.org:29418/core refs/changes/61/1861/1

Only call getScDocument when needed

Change-Id: I2dca76af46e63b5dd833f5a60549d4b1a7b03d84
---
M sc/source/filter/oox/stylesbuffer.cxx
1 file changed, 1 insertion(+), 1 deletion(-)



diff --git a/sc/source/filter/oox/stylesbuffer.cxx b/sc/source/filter/oox/stylesbuffer.cxx
index bb3672d..3657f9b 100644
--- a/sc/source/filter/oox/stylesbuffer.cxx
+++ b/sc/source/filter/oox/stylesbuffer.cxx
@@ -2715,11 +2715,11 @@
     if( !mbCreated )
         mbCreated = maFinalName.isEmpty();
 
-    ::ScDocument& rDoc = getScDocument();
     if( !mbCreated && !mpStyleSheet )
     {
         bool bCreatePattern = false;
         Xf* pXF = getStyles().getStyleXf( maModel.mnXfId ).get();
+        ::ScDocument& rDoc = getScDocument();
 
         bool bDefStyle = maModel.isDefaultStyle();
         if( bDefStyle )

-- 
To view, visit https://gerrit.libreoffice.org/1861
To unsubscribe, visit https://gerrit.libreoffice.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I2dca76af46e63b5dd833f5a60549d4b1a7b03d84
Gerrit-PatchSet: 1
Gerrit-Project: core
Gerrit-Branch: master
Gerrit-Owner: Marcos Souza <marcos.souza.org at gmail.com>



More information about the LibreOffice mailing list