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;
99 xStatusIndicator.set(pItem->
GetValue(), uno::UNO_QUERY);
101 return xStatusIndicator;
105 const uno::Reference<frame::XModel>& xModel,
106 xml::sax::InputSource& aParserInput,
107 const OUString& sComponentName,
const OUString& sDocName,
108 const uno::Sequence<uno::Any>& aArgs,
109 bool bMustBeSuccessful)
111 uno::Reference < io::XStream > xDocStream;
115 bool bEncrypted =
false;
121 if (
xStorage->hasByName(sDocName) &&
xStorage->isStreamElement( sDocName) )
122 xDocStream =
xStorage->openStreamElement( sDocName, embed::ElementModes::READ );
126 aParserInput.aInputStream = xDocStream->getInputStream();
127 uno::Reference < beans::XPropertySet > xSet( xDocStream, uno::UNO_QUERY );
129 uno::Any aAny = xSet->getPropertyValue(
"Encrypted");
132 catch(
const packages::WrongPasswordException& )
136 catch(
const packages::zip::ZipIOException& )
140 catch(
const uno::Exception& )
149 uno::Reference< beans::XPropertySet > xInfoSet;
150 if( aArgs.hasElements() )
151 aArgs.getConstArray()[0] >>= xInfoSet;
152 OSL_ENSURE( xInfoSet.is(),
"missing property set" );
161 uno::Reference<XInterface> xImportInterface =
162 xContext->getServiceManager()->createInstanceWithArgumentsAndContext(
163 sComponentName, aArgs, xContext );
164 SAL_WARN_IF( !xImportInterface,
"sc",
"can't get Calc importer " << sComponentName );
165 uno::Reference<document::XImporter> xImporter( xImportInterface, uno::UNO_QUERY );
167 xImporter->setTargetDocument(
xModel );
179 uno::Reference< xml::sax::XFastParser > xFastParser(xImportInterface, uno::UNO_QUERY);
181 xFastParser->parseStream( aParserInput );
184 uno::Reference<xml::sax::XParser> xParser = xml::sax::Parser::create(xContext);
185 uno::Reference<css::xml::sax::XDocumentHandler> xDocumentHandler(xImportInterface, uno::UNO_QUERY);
186 xParser->setDocumentHandler( xDocumentHandler );
187 xParser->parseStream( aParserInput );
190 catch(
const xml::sax::SAXParseException& r )
195 xml::sax::SAXException aSaxEx = *
static_cast<xml::sax::SAXException
const *
>(&r);
196 bool bTryChild =
true;
200 xml::sax::SAXException aTmp;
201 if ( aSaxEx.WrappedException >>= aTmp )
207 packages::zip::ZipIOException aBrokenPackage;
208 if ( aSaxEx.WrappedException >>= aBrokenPackage )
210 else if( bEncrypted )
216 OUString sErr = OUString::number( r.LineNumber ) +
218 OUString::number( r.ColumnNumber );
220 if( !sDocName.isEmpty() )
226 DialogMask::ButtonsOk | DialogMask::MessageError );
230 OSL_ENSURE( bMustBeSuccessful,
"Warnings are not supported" );
232 DialogMask::ButtonsOk | DialogMask::MessageError );
236 catch(
const xml::sax::SAXException& r )
239 packages::zip::ZipIOException aBrokenPackage;
240 if ( r.WrappedException >>= aBrokenPackage )
242 else if( bEncrypted )
251 catch(
const packages::zip::ZipIOException& )
257 catch(
const io::IOException& )
263 catch(
const uno::Exception& )
286 xml::sax::InputSource aParserInput;
322 uno::Reference< container::XChild > xChild(
xModel, uno::UNO_QUERY );
325 uno::Reference< beans::XPropertySet > xParentSet( xChild->getParent(), uno::UNO_QUERY );
326 if( xParentSet.is() )
328 uno::Reference< beans::XPropertySetInfo > xPropSetInfo( xParentSet->getPropertySetInfo() );
329 OUString sPropName(
"BuildId" );
330 if( xPropSetInfo.is() && xPropSetInfo->hasPropertyByName(sPropName) )
332 xInfoSet->setPropertyValue( sPropName, xParentSet->getPropertyValue(sPropName) );
338 if (xStatusIndicator.is())
340 sal_Int32 nProgressRange(1000000);
341 xStatusIndicator->start(
SvxResId(RID_SVXSTR_DOC_LOAD), nProgressRange);
342 xInfoSet->setPropertyValue(
"ProgressRange",
uno::Any(nProgressRange));
346 OSL_ENSURE(
pMedium,
"There is no medium to get MediaDescriptor from!" );
349 SAL_INFO_IF(aBaseURL.isEmpty(),
"sc.filter",
"ScXMLImportWrapper: no base URL");
350 OUString sPropName(
"BaseURI");
351 xInfoSet->setPropertyValue( sPropName,
uno::Any( aBaseURL ) );
361 if ( pDocHierarchItem )
365 aName =
"dummyObjectName";
367 if( !
aName.isEmpty() )
369 sPropName =
"StreamRelPath";
375 xInfoSet->setPropertyValue(
"OrganizerMode",
uno::Any(
true));
386 const uno::Reference< rdf::XDocumentMetadataAccess > xDMA(
387 xModel, uno::UNO_QUERY_THROW );
388 const uno::Reference< rdf::XURI > xBaseURI(
389 ::sfx2::createBaseURI( xContext,
xModel, aBaseURL,
aName ) );
390 uno::Reference<task::XInteractionHandler> xHandler =
392 xDMA->loadMetadataFromStorage(
xStorage, xBaseURI, xHandler );
394 catch (
const lang::WrappedTargetException & e)
396 ucb::InteractiveAugmentedIOException iaioe;
397 if ( e.TargetException >>= iaioe )
406 catch (
const uno::Exception &)
416 uno::Sequence<uno::Any> aMetaArgs {
Any(xInfoSet) };
418 SAL_INFO(
"sc.filter",
"meta import start" );
421 xContext,
xModel, aParserInput,
422 bOasis ? OUString(
"com.sun.star.comp.Calc.XMLOasisMetaImporter")
423 : OUString(
"com.sun.star.comp.Calc.XMLMetaImporter"),
424 "meta.xml", aMetaArgs,
false);
426 SAL_INFO(
"sc.filter",
"meta import end" );
430 uno::Reference<document::XGraphicStorageHandler> xGraphicStorageHandler;
432 uno::Reference< document::XEmbeddedObjectResolver > xObjectResolver;
438 xGraphicStorageHandler = xGraphicHelper.get();
441 xObjectResolver = xObjectHelper.get();
443 uno::Sequence<uno::Any> aStylesArgs
446 Any(xGraphicStorageHandler),
447 Any(xStatusIndicator),
457 uno::Sequence<uno::Any> aSettingsArgs {
Any(xInfoSet) };
459 SAL_INFO(
"sc.filter",
"settings import start" );
462 xContext,
xModel, aParserInput,
463 bOasis ? OUString(
"com.sun.star.comp.Calc.XMLOasisSettingsImporter")
464 : OUString(
"com.sun.star.comp.Calc.XMLSettingsImporter"),
465 "settings.xml", aSettingsArgs,
false);
467 SAL_INFO(
"sc.filter",
"settings import end" );
473 SAL_INFO(
"sc.filter",
"styles import start" );
476 bOasis ? OUString(
"com.sun.star.comp.Calc.XMLOasisStylesImporter")
477 : OUString(
"com.sun.star.comp.Calc.XMLStylesImporter"),
481 SAL_INFO(
"sc.filter",
"styles import end" );
491 uno::Sequence<uno::Any> aDocArgs
494 Any(xGraphicStorageHandler),
495 Any(xStatusIndicator),
499 SAL_INFO(
"sc.filter",
"content import start" );
502 bOasis ? OUString(
"com.sun.star.comp.Calc.XMLOasisContentImporter")
503 : OUString(
"com.sun.star.comp.Calc.XMLContentImporter"),
508 SAL_INFO(
"sc.filter",
"content import end" );
510 if( xGraphicHelper.is() )
511 xGraphicHelper->dispose();
512 xGraphicHelper.clear();
514 if( xObjectHelper.is() )
515 xObjectHelper->dispose();
516 xObjectHelper.clear();
518 if (xStatusIndicator.is())
519 xStatusIndicator->end();
531 else if (nStylesRetval)
532 rError = nStylesRetval;
533 else if (nMetaRetval)
534 rError = nMetaRetval;
535 else if (nSettingsRetval)
536 rError = nSettingsRetval;
540 ::svx::DropUnusedNamedItems(
xModel);
545 uno::Reference< beans::XPropertySet > xModelSet(
xModel, uno::UNO_QUERY );
548 uno::Reference< beans::XPropertySetInfo > xModelSetInfo( xModelSet->getPropertySetInfo() );
549 OUString sBuildPropName(
"BuildId" );
550 if( xModelSetInfo.is() && xModelSetInfo->hasPropertyByName(sBuildPropName) )
552 xModelSet->setPropertyValue( sBuildPropName, xInfoSet->getPropertyValue(sBuildPropName) );
557 uno::Any aAny = xInfoSet->getPropertyValue(
"ScriptConfiguration");
558 uno::Reference <container::XNameAccess> xCodeNameAccess;
559 if( aAny >>= xCodeNameAccess )
563 bool bVBACompat =
false;
564 if ( (xInfoSet->getPropertyValue(
"VBACompatibilityMode") >>= bVBACompat) && bVBACompat )
569 if ( xModelSet.is() )
try
571 uno::Reference< script::vba::XVBACompatibility > xVBACompat( xModelSet->getPropertyValue(
572 "BasicLibraries" ), uno::UNO_QUERY_THROW );
573 xVBACompat->setVBACompatibilityMode(
true );
575 catch(
const uno::Exception& )
594 if ( !pSrcMed || pSrcMed->
IsRemote() )
598 for (
SCTAB nTab=0; nTab<nTabCount; ++nTab)
605 const uno::Reference<frame::XModel>& xModel,
const uno::Reference<xml::sax::XWriter>& xWriter,
606 const uno::Sequence<beans::PropertyValue>& aDescriptor,
const OUString& sName,
607 const OUString& sMediaType,
const OUString& sComponentName,
608 const uno::Sequence<uno::Any>& aArgs, std::unique_ptr<ScMySharedData>& pSharedData)
611 uno::Reference<io::XOutputStream> xOut;
612 uno::Reference<io::XStream>
xStream;
623 xStream =
xStorage->openStreamElement(
sName, embed::ElementModes::READWRITE | embed::ElementModes::TRUNCATE );
624 uno::Reference < beans::XPropertySet > xSet(
xStream, uno::UNO_QUERY );
630 xSet->setPropertyValue(
"UseCommonStoragePasswordEncryption",
uno::Any(
true) );
633 xOut =
xStream->getOutputStream();
637 uno::Reference< beans::XPropertySet > xInfoSet;
638 if( aArgs.hasElements() )
639 aArgs.getConstArray()[0] >>= xInfoSet;
640 OSL_ENSURE( xInfoSet.is(),
"missing property set" );
643 xInfoSet->setPropertyValue(
"StreamName",
uno::Any(
sName ) );
646 xWriter->setOutputStream( xOut );
648 uno::Reference<document::XFilter> xFilter(
649 xContext->getServiceManager()->createInstanceWithArgumentsAndContext(
650 sComponentName , aArgs, xContext ),
652 OSL_ENSURE( xFilter.is(),
"can't get exporter" );
653 uno::Reference<document::XExporter> xExporter( xFilter, uno::UNO_QUERY );
655 xExporter->setSourceDocument(
xModel );
660 assert(pExport &&
"can only succeed");
670 uno::Reference<io::XStream> xSrcStream;
671 uno::Reference<io::XInputStream> xSrcInput;
680 if (xTmpStorage.is())
681 xSrcStream = xTmpStorage->openStreamElement(
sName, embed::ElementModes::READ );
683 xSrcInput = xSrcStream->getInputStream();
685 catch (
const uno::Exception&)
692 bRet = xFilter->filter( aDescriptor );
699 if ( !bRet || !xSrcInput.is() )
702 for (
SCTAB nTab=0; nTab<nTabCount; nTab++)
707 bRet = xFilter->filter( aDescriptor );
721 bool bOldLock = bool();
735 uno::Reference<xml::sax::XWriter> xWriter = xml::sax::Writer::create(xContext);
770 uno::Reference<drawing::XDrawPagesSupplier>
const xDPS(
xModel, uno::UNO_QUERY);
771 uno::Reference<container::XIndexAccess>
const xDPs(xDPS->getDrawPages());
773 for (
auto i = xDPs->getCount(); 0 <
i; )
776 uno::Reference<drawing::XShapes>
const xDP(xDPs->getByIndex(
i), uno::UNO_QUERY);
779 [](uno::Reference<beans::XPropertySet>
const& xShape)
781 sal_Int16 nLayerID(0);
782 xShape->getPropertyValue(
"LayerID") >>= nLayerID;
802 sal_Int32 nProgressRange(1000000);
803 if(xStatusIndicator.is())
804 xStatusIndicator->start(
ScResId(STR_SAVE_DOC), nProgressRange);
805 xInfoSet->setPropertyValue(
"ProgressRange",
uno::Any(nProgressRange));
807 bool bUsePrettyPrinting = officecfg::Office::Common::Save::Document::PrettyPrinting::get();
808 xInfoSet->setPropertyValue(
"UsePrettyPrinting",
uno::Any(bUsePrettyPrinting));
812 OSL_ENSURE(
pMedium,
"There is no medium to get MediaDescriptor from!" );
814 OUString sPropName(
"BaseURI");
815 xInfoSet->setPropertyValue( sPropName,
uno::Any( aBaseURL ) );
818 if( SfxObjectCreateMode::EMBEDDED == pObjSh->
GetCreateMode() )
820 OUString
aName(
"dummyObjectName");
825 if ( pDocHierarchItem )
829 if( !
aName.isEmpty() )
831 sPropName =
"StreamRelPath";
836 OUString sTextMediaType(
"text/xml");
837 bool bMetaRet(pObjSh->
GetCreateMode() == SfxObjectCreateMode::EMBEDDED);
838 bool bStylesRet (
false);
840 bool bSettingsRet(
false);
841 std::unique_ptr<ScMySharedData> pSharedData;
846 if ( !bStylesOnly && bOasis )
848 const uno::Reference< beans::XPropertySet > xPropSet(
xStorage, uno::UNO_QUERY_THROW );
852 if (( xPropSet->getPropertyValue(
"Version") >>= aVersion )
856 const uno::Reference< rdf::XDocumentMetadataAccess > xDMA(
857 xModel, uno::UNO_QUERY_THROW );
858 xDMA->storeMetadataToStorage(
xStorage );
861 catch (
const beans::UnknownPropertyException &)
864 catch (
const uno::Exception &)
870 if (!bStylesOnly && !bMetaRet)
872 uno::Sequence<uno::Any> aMetaArgs
876 Any(xStatusIndicator)
879 SAL_INFO(
"sc.filter",
"meta export start" );
884 bOasis ? OUString(
"com.sun.star.comp.Calc.XMLOasisMetaExporter")
885 : OUString(
"com.sun.star.comp.Calc.XMLMetaExporter"),
886 aMetaArgs, pSharedData);
888 SAL_INFO(
"sc.filter",
"meta export end" );
891 uno::Reference<document::XGraphicStorageHandler> xGraphicStorageHandler;
897 xGraphicStorageHandler = xGraphicHelper.get();
901 xStorage, *pObjSh, SvXMLEmbeddedObjectHelperMode::Write);
902 uno::Reference<document::XEmbeddedObjectResolver> xObjectResolver(xObjectHelper);
907 uno::Sequence<uno::Any> aStylesArgs
910 Any(xGraphicStorageHandler),
911 Any(xStatusIndicator),
916 SAL_INFO(
"sc.filter",
"styles export start" );
921 bOasis ? OUString(
"com.sun.star.comp.Calc.XMLOasisStylesExporter")
922 : OUString(
"com.sun.star.comp.Calc.XMLStylesExporter"),
923 aStylesArgs, pSharedData);
925 SAL_INFO(
"sc.filter",
"styles export end" );
932 uno::Sequence<uno::Any> aDocArgs
935 Any(xGraphicStorageHandler),
936 Any(xStatusIndicator),
941 SAL_INFO(
"sc.filter",
"content export start" );
946 bOasis ? OUString(
"com.sun.star.comp.Calc.XMLOasisContentExporter")
947 : OUString(
"com.sun.star.comp.Calc.XMLContentExporter"),
948 aDocArgs, pSharedData);
950 SAL_INFO(
"sc.filter",
"content export end" );
954 xGraphicHelper->dispose();
955 xGraphicHelper.clear();
958 xObjectHelper->dispose();
959 xObjectHelper.clear();
965 uno::Sequence<uno::Any> aSettingsArgs
969 Any(xStatusIndicator)
972 SAL_INFO(
"sc.filter",
"settings export start" );
977 bOasis ? OUString(
"com.sun.star.comp.Calc.XMLOasisSettingsExporter")
978 : OUString(
"com.sun.star.comp.Calc.XMLSettingsExporter"),
979 aSettingsArgs, pSharedData);
981 SAL_INFO(
"sc.filter",
"settings export end" );
986 if (xStatusIndicator.is())
987 xStatusIndicator->end();
988 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)