sd/source/ui/func/futext.cxx  |    3 ---
 svx/source/svdraw/svdedxv.cxx |    7 +++++++
 2 files changed, 7 insertions(+), 3 deletions(-)

New commits:
commit 55df6fce4f333adda627b384deec0dfe8626b167
Author:     Mike Kaganski <mike.kagan...@collabora.com>
AuthorDate: Fri Jul 3 16:25:03 2020 +0300
Commit:     Mike Kaganski <mike.kagan...@collabora.com>
CommitDate: Wed Jul 29 10:18:55 2020 +0200

    Re-implement 481e686a66e550229ec0b600a785452f0d753342
    
    Marking documents modified simply on entry to an edit box created a
    problem, when using search in a read-only Online session made the
    document modified, and then auto-save failed, displaying a warning:
    
        Document cannot be saved. Check your permissions or contact the
        storage server administrator.
    
    The original problem, that 481e686a66e550229ec0b600a785452f0d753342
    fixed, was that entering a box in Impress in browser, typing, then
    pressing Save without exiting the box did not save the edits. Yet,
    the same sequence works outside of Online. In that case, the doc is
    marked modified in SdrObjEditView::KeyInput, which obviously is not
    called from Online, where SdrObjEditView::Command is called instead
    with CommandEventId::ExtTextInput. So just make sure that we mark
    the document modified also in this case, making sure that only the
    actual edits set the "modified" flag.
    
    This reverts 481e686a66e550229ec0b600a785452f0d753342.
    
    Change-Id: Ib05bc0492616a306dd328bcb8f2e1c9d7e7aa191
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97870
    Tested-by: Mike Kaganski <mike.kagan...@collabora.com>
    Reviewed-by: Mike Kaganski <mike.kagan...@collabora.com>
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98133
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com>

diff --git a/sd/source/ui/func/futext.cxx b/sd/source/ui/func/futext.cxx
index 7e3b351f9ebe..1db0231f19d1 100644
--- a/sd/source/ui/func/futext.cxx
+++ b/sd/source/ui/func/futext.cxx
@@ -64,7 +64,6 @@
 #include <DrawDocShell.hxx>
 #include <strings.hrc>
 #include <pres.hxx>
-#include <comphelper/lok.hxx>
 
 using namespace ::com::sun::star;
 using namespace ::com::sun::star::uno;
@@ -196,8 +195,6 @@ void FuText::DoExecute( SfxRequest& )
         SdrViewEvent aVEvt;
         mpView->PickAnything(aMEvt, SdrMouseEventKind::BUTTONDOWN, aVEvt);
         mpView->MarkObj(aVEvt.pRootObj, pPV);
-        if (comphelper::LibreOfficeKit::isActive() && mpViewShell && 
mpViewShell->GetDocSh())
-            mpViewShell->GetDocSh()->SetModified();
 
         mxTextObj.reset( dynamic_cast< SdrTextObj* >( aVEvt.pObj ) );
     }
diff --git a/svx/source/svdraw/svdedxv.cxx b/svx/source/svdraw/svdedxv.cxx
index bafc02dc27db..17c5f57f672d 100644
--- a/svx/source/svdraw/svdedxv.cxx
+++ b/svx/source/svdraw/svdedxv.cxx
@@ -2022,6 +2022,13 @@ bool SdrObjEditView::Command(const CommandEvent& rCEvt, 
vcl::Window* pWin)
         else
         {
             pTextEditOutlinerView->Command(rCEvt);
+            if (mpModel && comphelper::LibreOfficeKit::isActive())
+            {
+                // It could execute CommandEventId::ExtTextInput, while 
SdrObjEditView::KeyInput
+                // isn't called
+                if (pTextEditOutliner && pTextEditOutliner->IsModified())
+                    mpModel->SetChanged();
+            }
             return true;
         }
     }
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to