diff options
author | Daniel Bankston <daniel.e.bankston@gmail.com> | 2012-07-07 07:15:21 -0500 |
---|---|---|
committer | Kohei Yoshida <kohei.yoshida@gmail.com> | 2012-07-11 20:37:41 -0400 |
commit | e94b1331b1e2139e09bd0ef663394ede80f11be3 (patch) | |
tree | 59567fe977815e8006f0b684052f0bc0f85c4026 /sc/source/ui/docshell | |
parent | 5c5798878fd858183bd59b842ffa2ab79877cce5 (diff) |
Use indexOf instead of match
Change-Id: I2743929c3ba06ce1345d7217d9297515d2b5b2e4
Diffstat (limited to 'sc/source/ui/docshell')
-rw-r--r-- | sc/source/ui/docshell/docsh.cxx | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sc/source/ui/docshell/docsh.cxx b/sc/source/ui/docshell/docsh.cxx index 9e769de2ff66..752367c2ce3f 100644 --- a/sc/source/ui/docshell/docsh.cxx +++ b/sc/source/ui/docshell/docsh.cxx @@ -429,10 +429,13 @@ sal_Bool ScDocShell::LoadXML( SfxMedium* pLoadMedium, const ::com::sun::star::un if ( nError ) pLoadMedium->SetError( nError, ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ) ); + //if the document was not generated by LibreOffice, do hard recalc in case some other document + //generator saved cached formula results that differ from LibreOffice's calculated results or + //did not use cached formula results. uno::Reference<document::XDocumentPropertiesSupplier> xDPS(GetModel(), uno::UNO_QUERY_THROW); uno::Reference<document::XDocumentProperties> xDocProps = xDPS->getDocumentProperties(); rtl::OUString sGenerator(xDocProps->getGenerator()); - if(!sGenerator.match(SC_LIBO_PROD_NAME)) + if(sGenerator.indexOf(SC_LIBO_PROD_NAME) == -1) DoHardRecalc(false); aDocument.SetXMLFromWrapper( false ); |