summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoel Power <noel.power@suse.com>2013-02-01 16:12:28 +0000
committerNoel Power <noel.power@suse.com>2013-02-04 19:43:09 +0000
commit746d8b765ba8f2136d48bb5d8db301784fbb572d (patch)
treea4d9742c674750f6f965ff71d9f18fd63d855745
parent3270fc628b2e6a8f73ff0d1e4389d9c7595e0a50 (diff)
clean up EnableAdjustHeight calls, disable at start of import reset at end
Change-Id: I61ffa13d857134c4a39b1370f0bcd5b926b8e8a7
-rw-r--r--sc/source/filter/xml/xmlimprt.cxx1
-rw-r--r--sc/source/ui/docshell/docsh.cxx7
2 files changed, 2 insertions, 6 deletions
diff --git a/sc/source/filter/xml/xmlimprt.cxx b/sc/source/filter/xml/xmlimprt.cxx
index 6fdd4ced3918..492662d5dc77 100644
--- a/sc/source/filter/xml/xmlimprt.cxx
+++ b/sc/source/filter/xml/xmlimprt.cxx
@@ -3175,7 +3175,6 @@ throw( ::com::sun::star::xml::sax::SAXException, ::com::sun::star::uno::RuntimeE
if(pDoc && bSelfImportingXMLSet)
ScModelObj::getImplementation(GetModel())->AfterXMLLoading(true);
- pDoc->EnableAdjustHeight( true );
}
// XEventListener
diff --git a/sc/source/ui/docshell/docsh.cxx b/sc/source/ui/docshell/docsh.cxx
index 8c92349195e3..adeefaf63c0e 100644
--- a/sc/source/ui/docshell/docsh.cxx
+++ b/sc/source/ui/docshell/docsh.cxx
@@ -412,6 +412,7 @@ sal_Bool ScDocShell::LoadXML( SfxMedium* pLoadMedium, const ::com::sun::star::un
sal_Bool bRet(false);
ErrCode nError = ERRCODE_NONE;
+ aDocument.EnableAdjustHeight(false);
if (GetCreateMode() != SFX_CREATE_MODE_ORGANIZER)
bRet = aImport.Import(false, nError);
else
@@ -470,14 +471,10 @@ sal_Bool ScDocShell::LoadXML( SfxMedium* pLoadMedium, const ::com::sun::star::un
aDocument.Broadcast( SC_HINT_DATACHANGED, BCA_BRDCST_ALWAYS, NULL );
}
- bool bAdjustHeightOld = aDocument.IsAdjustHeightEnabled();
- aDocument.EnableAdjustHeight(false);
-
aDocument.SetXMLFromWrapper( false );
AfterXMLLoading(bRet);
- aDocument.EnableAdjustHeight(bAdjustHeightOld);
-
+ aDocument.EnableAdjustHeight(true);
return bRet;
}