20#include <officecfg/Office/Common.hxx>
26#include <osl/diagnose.h>
32#include <svx/strings.hrc>
38#include <sfx2/sfxsids.hrc>
39#include <com/sun/star/container/XChild.hpp>
40#include <com/sun/star/beans/XPropertySetInfo.hpp>
41#include <com/sun/star/xml/sax/InputSource.hpp>
42#include <com/sun/star/xml/sax/Parser.hpp>
43#include <com/sun/star/xml/sax/XFastParser.hpp>
44#include <com/sun/star/xml/sax/Writer.hpp>
45#include <com/sun/star/xml/sax/SAXParseException.hpp>
46#include <com/sun/star/frame/XModel.hpp>
47#include <com/sun/star/beans/PropertyAttribute.hpp>
50#include <com/sun/star/packages/WrongPasswordException.hpp>
51#include <com/sun/star/packages/zip/ZipIOException.hpp>
52#include <com/sun/star/embed/ElementModes.hpp>
53#include <com/sun/star/script/vba/XVBACompatibility.hpp>
54#include <com/sun/star/rdf/XDocumentMetadataAccess.hpp>
55#include <com/sun/star/ucb/InteractiveAugmentedIOException.hpp>
56#include <com/sun/star/task/XStatusIndicator.hpp>
65#include <document.hxx>
78#include <unonames.hxx>
81using namespace css::uno;
85 rDoc(rDocSh.GetDocument()),
87 xStorage(
std::move(xStor))
89 OSL_ENSURE(
pMedium ||
xStorage.is(),
"ScXMLImportWrapper: Medium or Storage must be set" );
94 uno::Reference<task::XStatusIndicator> xStatusIndicator;
102 xStatusIndicator.set(pItem->
GetValue(), uno::UNO_QUERY);
105 return xStatusIndicator;
109 const uno::Reference<frame::XModel>& xModel,
110 xml::sax::InputSource& aParserInput,
111 const OUString& sComponentName,
const OUString& sDocName,
112 const uno::Sequence<uno::Any>& aArgs,
113 bool bMustBeSuccessful)
115 uno::Reference < io::XStream > xDocStream;
119 bool bEncrypted =
false;
125 if (
xStorage->hasByName(sDocName) &&
xStorage->isStreamElement( sDocName) )
126 xDocStream =
xStorage->openStreamElement( sDocName, embed::ElementModes::READ );
130 aParserInput.aInputStream = xDocStream->getInputStream();
131 uno::Reference < beans::XPropertySet > xSet( xDocStream, uno::UNO_QUERY );
133 uno::Any aAny = xSet->getPropertyValue(
"Encrypted");
136 catch(
const packages::WrongPasswordException& )
140 catch(
const packages::zip::ZipIOException& )
144 catch(
const uno::Exception& )
153 uno::Reference< beans::XPropertySet > xInfoSet;
154 if( aArgs.hasElements() )
155 aArgs.getConstArray()[0] >>= xInfoSet;
156 OSL_ENSURE( xInfoSet.is(),
"missing property set" );
165 uno::Reference<XInterface> xImportInterface =
166 xContext->getServiceManager()->createInstanceWithArgumentsAndContext(
167 sComponentName, aArgs, xContext );
168 SAL_WARN_IF( !xImportInterface,
"sc",
"can't get Calc importer " << sComponentName );
169 uno::Reference<document::XImporter> xImporter( xImportInterface, uno::UNO_QUERY );
171 xImporter->setTargetDocument(
xModel );
183 uno::Reference< xml::sax::XFastParser > xFastParser(xImportInterface, uno::UNO_QUERY);
185 xFastParser->parseStream( aParserInput );
188 uno::Reference<xml::sax::XParser> xParser = xml::sax::Parser::create(xContext);
189 uno::Reference<css::xml::sax::XDocumentHandler> xDocumentHandler(xImportInterface, uno::UNO_QUERY);
190 xParser->setDocumentHandler( xDocumentHandler );
191 xParser->parseStream( aParserInput );
194 catch(
const xml::sax::SAXParseException& r )
199 xml::sax::SAXException aSaxEx = *
static_cast<xml::sax::SAXException
const *
>(&r);
200 bool bTryChild =
true;
204 xml::sax::SAXException aTmp;
205 if ( aSaxEx.WrappedException >>= aTmp )
211 packages::zip::ZipIOException aBrokenPackage;
212 if ( aSaxEx.WrappedException >>= aBrokenPackage )
214 else if( bEncrypted )
220 OUString sErr = OUString::number( r.LineNumber ) +
222 OUString::number( r.ColumnNumber );
224 if( !sDocName.isEmpty() )
230 DialogMask::ButtonsOk | DialogMask::MessageError );
234 OSL_ENSURE( bMustBeSuccessful,
"Warnings are not supported" );
236 DialogMask::ButtonsOk | DialogMask::MessageError );
240 catch(
const xml::sax::SAXException& r )
243 packages::zip::ZipIOException aBrokenPackage;
244 if ( r.WrappedException >>= aBrokenPackage )
246 else if( bEncrypted )
255 catch(
const packages::zip::ZipIOException& )
261 catch(
const io::IOException& )
267 catch(
const uno::Exception& )
290 xml::sax::InputSource aParserInput;
326 uno::Reference< container::XChild > xChild(
xModel, uno::UNO_QUERY );
329 uno::Reference< beans::XPropertySet > xParentSet( xChild->getParent(), uno::UNO_QUERY );
330 if( xParentSet.is() )
332 uno::Reference< beans::XPropertySetInfo > xPropSetInfo( xParentSet->getPropertySetInfo() );
333 OUString sPropName(
"BuildId" );
334 if( xPropSetInfo.is() && xPropSetInfo->hasPropertyByName(sPropName) )
336 xInfoSet->setPropertyValue( sPropName, xParentSet->getPropertyValue(sPropName) );
342 if (xStatusIndicator.is())
344 sal_Int32 nProgressRange(1000000);
345 xStatusIndicator->start(
SvxResId(RID_SVXSTR_DOC_LOAD), nProgressRange);
346 xInfoSet->setPropertyValue(
"ProgressRange",
uno::Any(nProgressRange));
350 OSL_ENSURE(
pMedium,
"There is no medium to get MediaDescriptor from!" );
353 SAL_INFO_IF(aBaseURL.isEmpty(),
"sc.filter",
"ScXMLImportWrapper: no base URL");
354 OUString sPropName(
"BaseURI");
355 xInfoSet->setPropertyValue( sPropName,
uno::Any( aBaseURL ) );
365 if ( pDocHierarchItem )
369 aName =
"dummyObjectName";
371 if( !
aName.isEmpty() )
373 sPropName =
"StreamRelPath";
379 xInfoSet->setPropertyValue(
"OrganizerMode",
uno::Any(
true));
390 const uno::Reference< rdf::XDocumentMetadataAccess > xDMA(
391 xModel, uno::UNO_QUERY_THROW );
392 const uno::Reference< rdf::XURI > xBaseURI(
393 ::sfx2::createBaseURI( xContext,
xModel, aBaseURL,
aName ) );
394 uno::Reference<task::XInteractionHandler> xHandler =
396 xDMA->loadMetadataFromStorage(
xStorage, xBaseURI, xHandler );
398 catch (
const lang::WrappedTargetException & e)
400 ucb::InteractiveAugmentedIOException iaioe;
401 if ( e.TargetException >>= iaioe )
410 catch (
const uno::Exception &)
420 uno::Sequence<uno::Any> aMetaArgs {
Any(xInfoSet) };
422 SAL_INFO(
"sc.filter",
"meta import start" );
425 xContext,
xModel, aParserInput,
426 bOasis ? OUString(
"com.sun.star.comp.Calc.XMLOasisMetaImporter")
427 : OUString(
"com.sun.star.comp.Calc.XMLMetaImporter"),
428 "meta.xml", aMetaArgs,
false);
430 SAL_INFO(
"sc.filter",
"meta import end" );
434 uno::Reference<document::XGraphicStorageHandler> xGraphicStorageHandler;
436 uno::Reference< document::XEmbeddedObjectResolver > xObjectResolver;
442 xGraphicStorageHandler = xGraphicHelper.get();
445 xObjectResolver = xObjectHelper.get();
447 uno::Sequence<uno::Any> aStylesArgs
450 Any(xGraphicStorageHandler),
451 Any(xStatusIndicator),
461 uno::Sequence<uno::Any> aSettingsArgs {
Any(xInfoSet) };
463 SAL_INFO(
"sc.filter",
"settings import start" );
466 xContext,
xModel, aParserInput,
467 bOasis ? OUString(
"com.sun.star.comp.Calc.XMLOasisSettingsImporter")
468 : OUString(
"com.sun.star.comp.Calc.XMLSettingsImporter"),
469 "settings.xml", aSettingsArgs,
false);
471 SAL_INFO(
"sc.filter",
"settings import end" );
477 SAL_INFO(
"sc.filter",
"styles import start" );
480 bOasis ? OUString(
"com.sun.star.comp.Calc.XMLOasisStylesImporter")
481 : OUString(
"com.sun.star.comp.Calc.XMLStylesImporter"),
485 SAL_INFO(
"sc.filter",
"styles import end" );
495 uno::Sequence<uno::Any> aDocArgs
498 Any(xGraphicStorageHandler),
499 Any(xStatusIndicator),
503 SAL_INFO(
"sc.filter",
"content import start" );
506 bOasis ? OUString(
"com.sun.star.comp.Calc.XMLOasisContentImporter")
507 : OUString(
"com.sun.star.comp.Calc.XMLContentImporter"),
512 SAL_INFO(
"sc.filter",
"content import end" );
514 if( xGraphicHelper.is() )
515 xGraphicHelper->dispose();
516 xGraphicHelper.clear();
518 if( xObjectHelper.is() )
519 xObjectHelper->dispose();
520 xObjectHelper.clear();
522 if (xStatusIndicator.is())
523 xStatusIndicator->end();
535 else if (nStylesRetval)
536 rError = nStylesRetval;
537 else if (nMetaRetval)
538 rError = nMetaRetval;
539 else if (nSettingsRetval)
540 rError = nSettingsRetval;
544 ::svx::DropUnusedNamedItems(
xModel);
549 uno::Reference< beans::XPropertySet > xModelSet(
xModel, uno::UNO_QUERY );
552 uno::Reference< beans::XPropertySetInfo > xModelSetInfo( xModelSet->getPropertySetInfo() );
553 OUString sBuildPropName(
"BuildId" );
554 if( xModelSetInfo.is() && xModelSetInfo->hasPropertyByName(sBuildPropName) )
556 xModelSet->setPropertyValue( sBuildPropName, xInfoSet->getPropertyValue(sBuildPropName) );
561 uno::Any aAny = xInfoSet->getPropertyValue(
"ScriptConfiguration");
562 uno::Reference <container::XNameAccess> xCodeNameAccess;
563 if( aAny >>= xCodeNameAccess )
567 bool bVBACompat =
false;
568 if ( (xInfoSet->getPropertyValue(
"VBACompatibilityMode") >>= bVBACompat) && bVBACompat )
573 if ( xModelSet.is() )
try
575 uno::Reference< script::vba::XVBACompatibility > xVBACompat( xModelSet->getPropertyValue(
576 "BasicLibraries" ), uno::UNO_QUERY_THROW );
577 xVBACompat->setVBACompatibilityMode(
true );
579 catch(
const uno::Exception& )
598 if ( !pSrcMed || pSrcMed->
IsRemote() )
602 for (
SCTAB nTab=0; nTab<nTabCount; ++nTab)
609 const uno::Reference<frame::XModel>& xModel,
const uno::Reference<xml::sax::XWriter>& xWriter,
610 const uno::Sequence<beans::PropertyValue>& aDescriptor,
const OUString& sName,
611 const OUString& sMediaType,
const OUString& sComponentName,
612 const uno::Sequence<uno::Any>& aArgs, std::unique_ptr<ScMySharedData>& pSharedData)
615 uno::Reference<io::XOutputStream> xOut;
616 uno::Reference<io::XStream>
xStream;
627 xStream =
xStorage->openStreamElement(
sName, embed::ElementModes::READWRITE | embed::ElementModes::TRUNCATE );
628 uno::Reference < beans::XPropertySet > xSet(
xStream, uno::UNO_QUERY );
634 xSet->setPropertyValue(
"UseCommonStoragePasswordEncryption",
uno::Any(
true) );
637 xOut =
xStream->getOutputStream();
641 uno::Reference< beans::XPropertySet > xInfoSet;
642 if( aArgs.hasElements() )
643 aArgs.getConstArray()[0] >>= xInfoSet;
644 OSL_ENSURE( xInfoSet.is(),
"missing property set" );
647 xInfoSet->setPropertyValue(
"StreamName",
uno::Any(
sName ) );
650 xWriter->setOutputStream( xOut );
652 uno::Reference<document::XFilter> xFilter(
653 xContext->getServiceManager()->createInstanceWithArgumentsAndContext(
654 sComponentName , aArgs, xContext ),
656 OSL_ENSURE( xFilter.is(),
"can't get exporter" );
657 uno::Reference<document::XExporter> xExporter( xFilter, uno::UNO_QUERY );
659 xExporter->setSourceDocument(
xModel );
664 assert(pExport &&
"can only succeed");
674 uno::Reference<io::XStream> xSrcStream;
675 uno::Reference<io::XInputStream> xSrcInput;
684 if (xTmpStorage.is())
685 xSrcStream = xTmpStorage->openStreamElement(
sName, embed::ElementModes::READ );
687 xSrcInput = xSrcStream->getInputStream();
689 catch (
const uno::Exception&)
696 bRet = xFilter->filter( aDescriptor );
703 if ( !bRet || !xSrcInput.is() )
706 for (
SCTAB nTab=0; nTab<nTabCount; nTab++)
711 bRet = xFilter->filter( aDescriptor );
725 bool bOldLock = bool();
739 uno::Reference<xml::sax::XWriter> xWriter = xml::sax::Writer::create(xContext);
774 uno::Reference<drawing::XDrawPagesSupplier>
const xDPS(
xModel, uno::UNO_QUERY);
775 uno::Reference<container::XIndexAccess>
const xDPs(xDPS->getDrawPages());
777 for (
auto i = xDPs->getCount(); 0 <
i; )
780 uno::Reference<drawing::XShapes>
const xDP(xDPs->getByIndex(
i), uno::UNO_QUERY);
783 [](uno::Reference<beans::XPropertySet>
const& xShape)
785 sal_Int16 nLayerID(0);
786 xShape->getPropertyValue(
"LayerID") >>= nLayerID;
806 sal_Int32 nProgressRange(1000000);
807 if(xStatusIndicator.is())
808 xStatusIndicator->start(
ScResId(STR_SAVE_DOC), nProgressRange);
809 xInfoSet->setPropertyValue(
"ProgressRange",
uno::Any(nProgressRange));
811 bool bUsePrettyPrinting = officecfg::Office::Common::Save::Document::PrettyPrinting::get();
812 xInfoSet->setPropertyValue(
"UsePrettyPrinting",
uno::Any(bUsePrettyPrinting));
816 OSL_ENSURE(
pMedium,
"There is no medium to get MediaDescriptor from!" );
818 OUString sPropName(
"BaseURI");
819 xInfoSet->setPropertyValue( sPropName,
uno::Any( aBaseURL ) );
822 if( SfxObjectCreateMode::EMBEDDED == pObjSh->
GetCreateMode() )
824 OUString
aName(
"dummyObjectName");
829 if ( pDocHierarchItem )
833 if( !
aName.isEmpty() )
835 sPropName =
"StreamRelPath";
840 OUString sTextMediaType(
"text/xml");
841 bool bMetaRet(pObjSh->
GetCreateMode() == SfxObjectCreateMode::EMBEDDED);
842 bool bStylesRet (
false);
844 bool bSettingsRet(
false);
845 std::unique_ptr<ScMySharedData> pSharedData;
850 if ( !bStylesOnly && bOasis )
852 const uno::Reference< beans::XPropertySet > xPropSet(
xStorage, uno::UNO_QUERY_THROW );
856 if (( xPropSet->getPropertyValue(
"Version") >>= aVersion )
860 const uno::Reference< rdf::XDocumentMetadataAccess > xDMA(
861 xModel, uno::UNO_QUERY_THROW );
862 xDMA->storeMetadataToStorage(
xStorage );
865 catch (
const beans::UnknownPropertyException &)
868 catch (
const uno::Exception &)
874 if (!bStylesOnly && !bMetaRet)
876 uno::Sequence<uno::Any> aMetaArgs
880 Any(xStatusIndicator)
883 SAL_INFO(
"sc.filter",
"meta export start" );
888 bOasis ? OUString(
"com.sun.star.comp.Calc.XMLOasisMetaExporter")
889 : OUString(
"com.sun.star.comp.Calc.XMLMetaExporter"),
890 aMetaArgs, pSharedData);
892 SAL_INFO(
"sc.filter",
"meta export end" );
895 uno::Reference<document::XGraphicStorageHandler> xGraphicStorageHandler;
901 xGraphicStorageHandler = xGraphicHelper.get();
905 xStorage, *pObjSh, SvXMLEmbeddedObjectHelperMode::Write);
906 uno::Reference<document::XEmbeddedObjectResolver> xObjectResolver(xObjectHelper);
911 uno::Sequence<uno::Any> aStylesArgs
914 Any(xGraphicStorageHandler),
915 Any(xStatusIndicator),
920 SAL_INFO(
"sc.filter",
"styles export start" );
925 bOasis ? OUString(
"com.sun.star.comp.Calc.XMLOasisStylesExporter")
926 : OUString(
"com.sun.star.comp.Calc.XMLStylesExporter"),
927 aStylesArgs, pSharedData);
929 SAL_INFO(
"sc.filter",
"styles export end" );
936 uno::Sequence<uno::Any> aDocArgs
939 Any(xGraphicStorageHandler),
940 Any(xStatusIndicator),
945 SAL_INFO(
"sc.filter",
"content export start" );
950 bOasis ? OUString(
"com.sun.star.comp.Calc.XMLOasisContentExporter")
951 : OUString(
"com.sun.star.comp.Calc.XMLContentExporter"),
952 aDocArgs, pSharedData);
954 SAL_INFO(
"sc.filter",
"content export end" );
958 xGraphicHelper->dispose();
959 xGraphicHelper.clear();
962 xObjectHelper->dispose();
963 xObjectHelper.clear();
969 uno::Sequence<uno::Any> aSettingsArgs
973 Any(xStatusIndicator)
976 SAL_INFO(
"sc.filter",
"settings export start" );
981 bOasis ? OUString(
"com.sun.star.comp.Calc.XMLOasisSettingsExporter")
982 : OUString(
"com.sun.star.comp.Calc.XMLSettingsExporter"),
983 aSettingsArgs, pSharedData);
985 SAL_INFO(
"sc.filter",
"settings export end" );
990 if (xStatusIndicator.is())
991 xStatusIndicator->end();
992 return bStylesRet && ((!bStylesOnly && bDocRet && bMetaRet && bSettingsRet) || bStylesOnly);
constexpr OUStringLiteral sStream
constexpr OUStringLiteral sMediaType
const OUString & GetValue() const
ScModelObj * GetModel() const
void SetStreamValid(SCTAB nTab, bool bSet, bool bIgnoreLock=false)
bool HasRangeOverflow() const
bool IsStreamValid(SCTAB nTab) const
SC_DLLPUBLIC ScDrawLayer * GetDrawLayer()
void SetRangeOverflowType(ErrCode nType)
SfxObjectShell * GetDocumentShell() const
SC_DLLPUBLIC const ErrCode & GetRangeOverflowType() const
void CreateAllNoteCaptions()
Ensure that all note objects have an associated sdr object.
SC_DLLPUBLIC SCTAB GetTableCount() const
bool IsInSupportedSave() const
std::unique_ptr< ScMySharedData > ReleaseSharedData()
void SetSourceStream(const css::uno::Reference< css::io::XInputStream > &xNewStream)
void SetSharedData(std::unique_ptr< ScMySharedData > pTemp)
bool Export(bool bStylesOnly)
ScXMLImportWrapper(ScDocShell &rDocSh, SfxMedium *pM, css::uno::Reference< css::embed::XStorage > xStor)
bool ExportToComponent(const css::uno::Reference< css::uno::XComponentContext > &xContext, const css::uno::Reference< css::frame::XModel > &xModel, const css::uno::Reference< css::xml::sax::XWriter > &xWriter, const css::uno::Sequence< css::beans::PropertyValue > &aDescriptor, const OUString &sName, const OUString &sMediaType, const OUString &sComponentName, const css::uno::Sequence< css::uno::Any > &aArgs, std::unique_ptr< ScMySharedData > &pSharedData)
sc::ImportPostProcessData maPostProcessData
css::uno::Reference< css::embed::XStorage > xStorage
bool Import(ImportFlags nMode, ErrCode &rError)
css::uno::Reference< css::task::XStatusIndicator > GetStatusIndicator() const
ErrCode ImportFromComponent(const css::uno::Reference< css::uno::XComponentContext > &xContext, const css::uno::Reference< css::frame::XModel > &xModel, css::xml::sax::InputSource &aParserInput, const OUString &sComponentName, const OUString &sDocName, const css::uno::Sequence< css::uno::Any > &aArgs, bool bMustBeSuccessful)
void SetPostProcessData(sc::ImportPostProcessData *p)
bool IsUndoEnabled() const
const SfxPoolItem * GetItem(sal_uInt16 nWhich, bool bSearchInParent=true) const
OUString GetBaseURL(bool bForSaving=false)
SfxItemSet * GetItemSet() const
const OUString & GetName() const
css::uno::Reference< css::embed::XStorage > GetStorage(bool bCreateTempFile=true)
css::uno::Reference< css::embed::XStorage > GetOutputStorage()
css::uno::Reference< css::task::XInteractionHandler > GetInteractionHandler(bool bGetAlways=false)
SfxMedium * GetMedium() const
css::uno::Reference< css::frame::XModel3 > GetModel() const
css::uno::Reference< css::embed::XStorage > const & GetStorage()
SfxObjectCreateMode GetCreateMode() const
const css::uno::Any & GetValue() const
sal_Int32 GetVersion() const
static rtl::Reference< SvXMLEmbeddedObjectHelper > Create(const css::uno::Reference< css::embed::XStorage > &, ::comphelper::IEmbeddedHelper &rDocPersist, SvXMLEmbeddedObjectHelperMode eCreateMode)
SvXMLExportFlags getExportFlags() const
static rtl::Reference< SvXMLGraphicHelper > Create(const css::uno::Reference< css::embed::XStorage > &rXMLStorage, SvXMLGraphicHelperMode eCreateMode)
static void set(const css::uno::Reference< css::container::XNameAccess > &xNameAccess, ScDocument *pDoc)
css::uno::Type const & get()
OString exceptionToString(const css::uno::Any &caught)
#define TOOLS_WARN_EXCEPTION(area, stream)
SVXCORE_DLLPUBLIC OUString SvxResId(TranslateId aId)
constexpr OUStringLiteral ODFVER_011_TEXT
constexpr OUStringLiteral ODFVER_010_TEXT
#define ERRCODE_IO_BROKENPACKAGE
constexpr SdrLayerID SC_LAYER_HIDDEN(4)
constexpr SdrLayerID SC_LAYER_FRONT(0)
constexpr SdrLayerID SC_LAYER_INTERN(2)
constexpr SdrLayerID SC_LAYER_BACK(1)
constexpr SdrLayerID SC_LAYER_CONTROLS(3)
#define SAL_INFO_IF(condition, area, stream)
#define SAL_WARN_IF(condition, area, stream)
#define SAL_WARN(area, stream)
#define SAL_INFO(area, stream)
COMPHELPER_DLLPUBLIC css::uno::Reference< css::beans::XPropertySet > GenericPropertySet_CreateInstance(PropertySetInfo *pInfo)
Reference< XComponentContext > getProcessComponentContext()
css::uno::Sequence< css::beans::PropertyValue > InitPropertySequence(::std::initializer_list< ::std::pair< OUString, css::uno::Any > > vInit)
Any SAL_CALL getCaughtException()
void FixZOrder(uno::Reference< drawing::XShapes > const &xShapes, std::function< unsigned int(uno::Reference< beans::XPropertySet > const &)> const &rGetLayer)
OUString ScResId(TranslateId aId)
#define SCWARN_IMPORT_ROW_OVERFLOW
#define SCWARN_IMPORT_FILE_ROWCOL
#define SCERR_IMPORT_FORMAT
#define SCERR_IMPORT_UNKNOWN
#define SCWARN_IMPORT_RANGE_OVERFLOW
#define SCERR_IMPORT_FORMAT_ROWCOL
#define SCWARN_IMPORT_COLUMN_OVERFLOW
#define SCERR_IMPORT_FILE_ROWCOL
#define SCWARN_IMPORT_SHEET_OVERFLOW
#define SCERR_IMPORT_OPEN
#define SCWARN_IMPORT_FEATURES_LOST
#define ERRCODE_SFX_WRONGPASSWORD
Reference< XModel > xModel
constexpr OUStringLiteral SC_UNO_ODS_IMPORT_STYLES
constexpr OUStringLiteral SC_UNO_ODS_LOCK_SOLAR_MUTEX
static bool lcl_HasValidStream(const ScDocument &rDoc)