Created attachment 141761 [details] example of a doc that can't be saved ## Steps to reproduce * Insert a document containing an OLE object, for example a spreadsheet containing a chart * try to save it See the two examples attached : - spreadsheet without chart.ods - spreadsheet with chart.ods Another way to reproduce : * insert a chart in a spreadsheet with Collabora Online 3.2 * save the doc ## Actual behaviour * error message, translated from french : this document can't be saved ## Expected behaviour * saving the document ## General server configuration **Operating system:** Linux 3.10.0-693.21.1.el7.x86_64 Centos CentOS Linux release 7.4.1708 (Core) **Webserver:** Apache/2.4.6 (CentOS) **Database:** mysql 5.5.56 **PHP version:** 7.2.5 Modules loaded: Core, date, libxml, openssl, pcre, zlib, filter, hash, Reflection, SPL, session, standard, apache2handler, bz2, calendar, ctype, curl, dom, mbstring, fileinfo, ftp, gd, gettext, iconv, intl, json, ldap, exif, mcrypt, mysqlnd, PDO, apcu, posix, shmop, SimpleXML, sockets, sqlite3, sysvmsg, sysvsem, sysvshm, tokenizer, xml, xmlwriter, xsl, mysqli, pdo_mysql, pdo_sqlite, wddx, xmlreader, apc, smbclient, zip, Phar, libsmbclient, Zend OPcache **LibreOffice Online version:** Collabora Online 3.2.0 **Nextcloud version:** 13.0.2 ** richdocuments version:** 2.0.8
Created attachment 141762 [details] example of a doc that can be saved
Created attachment 141763 [details] error message displayed
The proximate cause is we're triggering a save-as / file-dialog in this case somehow under the hood in some cases; very odd. (gdb) bt #0 0x00007f4e9dc50d19 in ModelData_Impl::OutputFileDialog(short, comphelper::SequenceAsHashMap const&, bool, rtl::OUString&, bool, rtl::OUString&, short, rtl::OUString const&, com::sun::star::uno::Sequence<rtl::OUString> const&) (this=0x7f4e4f009780, nStoreMode=32, aPreselectedFilterPropsHM=..., bSetStandardName=false, aSuggestedName="", bPreselectPassword=false, aSuggestedDir="", nDialog=0, rStandardDir="", rBlackList=empty uno::Sequence) at /data/opt/libreoffice/master/sfx2/source/doc/guisaveas.cxx:1000 #1 0x00007f4e9dc564dd in SfxStoringHelper::GUIStoreModel(com::sun::star::uno::Reference<com::sun::star::frame::XModel> const&, rtl::OUString const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue>&, bool, SignatureState) (this=0x7f4e4f00a150, xModel=uno::Reference to (ScModelObj *) 0x7f4e400e4760, aSlotName="Save", aArgsSequence=uno::Sequence of length 3 = {...}, bPreselectPassword=false, nDocumentSignatureState=SignatureState::NOSIGNATURES) at /data/opt/libreoffice/master/sfx2/source/doc/guisaveas.cxx:1530 #2 0x00007f4e9dc7d61a in SfxObjectShell::ExecFile_Impl(SfxRequest&) (this=0x7f4e400d1cb0, rReq=...) at /data/opt/libreoffice/master/sfx2/source/doc/objserv.cxx:650 #3 0x00007f4e9dc7b515 in SfxStubSfxObjectShellExecFile_Impl(SfxShell*, SfxRequest&) (pShell=0x7f4e400d1cb0, rReq=...) at /data/opt/libreoffice/master/workdir/SdiTarget/sfx2/sdi/sfxslots.hxx:200 #4 0x00007f4e9d938612 in SfxShell::CallExec(void (*)(SfxShell*, SfxRequest&), SfxRequest&) (this=0x7f4e400d1cb0, pFunc=0x7f4e9dc7b4f0 <SfxStubSfxObjectShellExecFile_Impl(SfxShell*, SfxRequest&)>, rReq=...) at /data/opt/libreoffice/master/include/sfx2/shell.hxx:211 #5 0x00007f4e9d98af7f in SfxShell::ExecuteSlot(SfxRequest&, SfxInterface const*) (this=0x7f4e400d1cb0, rReq=..., pIF=0x7f4e400dbab0) at /data/opt/libreoffice/master/sfx2/source/control/shell.cxx:443 #6 0x00007f4e832204a2 in ScTabViewShell::ExecuteSave(SfxRequest&) (this=0x7f4e4038bb30, rReq=...) at /data/opt/libreoffice/master/sc/source/ui/view/tabvwsha.cxx:749 #7 0x00007f4e832065f5 in SfxStubScTabViewShellExecuteSave(SfxShell*, SfxRequest&) (pShell=0x7f4e4038bb30, rReq=...) at /data/opt/libreoffice/master/workdir/SdiTarget/sc/sdi/scslots.hxx:1429 #8 0x00007f4e9d938612 in SfxShell::CallExec(void (*)(SfxShell*, SfxRequest&), SfxRequest&) (this=0x7f4e4038bb30, pFunc=0x7f4e832065d0 <SfxStubScTabViewShellExecuteSave(SfxShell*, SfxRequest&)>, rReq=...) at /data/opt/libreoffice/master/include/sfx2/shell.hxx:211 #9 0x00007f4e9d92dfcc in SfxDispatcher::Call_Impl(SfxShell&, SfxSlot const&, SfxRequest&, bool) (this=0x7f4e4037ae60, rShell=..., rSlot=..., rReq=..., bRecord=false) at /data/opt/libreoffice/master/sfx2/source/control/dispatch.cxx:355 #10 0x00007f4e9d932099 in SfxDispatcher::Execute_(SfxShell&, SfxSlot const&, SfxRequest&, SfxCallMode) (this=0x7f4e4037ae60, rShell=..., rSlot=..., rReq=..., eCallMode=SfxCallMode::SYNCHRON) at /data/opt/libreoffice/master/sfx2/source/control/dispatch.cxx:877 #11 0x00007f4e9d9325ee in SfxDispatcher::Execute(unsigned short, SfxCallMode, SfxItemSet const*, SfxItemSet const*, unsigned short) (this=0x7f4e4037ae60, nSlot=5505, nCall=SfxCallMode::SYNCHRON, pArgs=0x7f4e405d75f0, pInternalArgs=0x7f4e4f00b080, nModi=0) at /data/opt/libreoffice/master/sfx2/source/control/dispatch.cxx:945 #12 0x00007f4e9d9eb513 in SfxDispatchController_Impl::dispatch(com::sun::star::util::URL const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&, com::sun::star::uno::Reference<com::sun::star::frame::XDispatchResultListener> const&) (this=0x7f4e4055e010, aURL=..., aArgs=uno::Sequence of length 3 = {...}, rListener=uno::Reference to (DispatchResultListener *) 0x7f4e405c6568) at /data/opt/libreoffice/master/sfx2/source/control/unoctitm.cxx:738 #13 0x00007f4e9d9ebf83 in SfxOfficeDispatch::dispatchWithNotification(com::sun::star::util::URL const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&, com::sun::star::uno::Reference<com::sun::star::frame::XDispatchResultListener> const&) (this=0x7f4e400bdb10, aURL=..., aArgs=uno::Sequence of length 3 = {...}, rListener=uno::Reference to (DispatchResultListener *) 0x7f4e405c6568) at /data/opt/libreoffice/master/sfx2/source/control/unoctitm.cxx:240 #14 0x00007f4ea05bf924 in comphelper::dispatchCommand(rtl::OUString const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&, com::sun::star::uno::Reference<com::sun::star::frame::XDispatchResultListener> const&) (rCommand=".uno:Save", rArguments=uno::Sequence of length 3 = {...}, aListener=uno::Reference to (DispatchResultListener *) 0x7f4e405c6568) at /data/opt/libreoffice/master/comphelper/source/misc/dispatchcommand.cxx:60 #15 0x00007f4ea2657bfb in doc_postUnoCommand(_LibreOfficeKitDocument*, char const*, char const*, bool) (pThis=0x7f4e405156e0, pCommand=0x7f4e40581df8 ".uno:Save", pArguments=0x7f4e405ed318 "{\"NoFileSync\":{\"type\":\"boolean\",\"value\":true}}", bNotifyWhenFinished=true) at /data/opt/libreoffice/master/desktop/source/lib/init.cxx:2465 #16 0x00000000004dca05 in lok::Document::postUnoCommand(char const*, char const*, bool) (this=0x7f4e4000b470, pCommand=0x7f4e40581df8 ".uno:Save", pArguments=0x7f4e405ed318 "{\"NoFileSync\":{\"type\":\"boolean\",\"value\":true}}", bNotifyWhenFinished=true) at /data/opt/libreoffice/master/include/LibreOfficeKit/LibreOfficeKit.hxx:321 It seems we drop out of here: sal_Int8 ModelData_Impl::CheckStateForSave() { // if the document is readonly or a new one a SaveAs operation must be used if ( !GetStorable()->hasLocation() || GetStorable()->isReadonly() ) return STATUS_SAVEAS; (gdb) p GetStorable()->hasLocation() $14 = 0 '\000' (gdb) p GetStorable()->isReadonly() $15 = 0 '\000'
sal_Bool SAL_CALL SfxBaseModel::hasLocation() { SfxModelGuard aGuard( *this ); return m_pData->m_pObjectShell.is() && m_pData->m_pObjectShell->HasName(); } HasName() returns false; which suggests that the SfxObjectShell is created without a name set; or - somehow SfxObjectShell::SetNoName is getting called - which appears only to happen from: void SfxObjectShell::TemplateDisconnectionAfterLoad() ErrCode SfxApplication::LoadTemplate(... Which would suggest that the file-types of the templates being used to construct these files are (erroneously) template and not plain files: and as such we're getting a forced prompt for a new name on save; which is cancelled ...
Fix in master: https://cgit.freedesktop.org/libreoffice/online/commit/?id=7f3c4b9dd8f5bae8cdc9624ecebb83d257ba8f15