Blame SOURCES/0091-tdf-93154-Save-button-often-does-not-save.patch

f325b2
From 72189a2e2d875772e83eb7c110540f224262eec9 Mon Sep 17 00:00:00 2001
f325b2
From: Mihai Varga <mihai.varga@collabora.com>
f325b2
Date: Wed, 12 Aug 2015 10:32:07 +0300
f325b2
Subject: [PATCH 091/398] tdf#93154: Save button often does not save
f325b2
f325b2
The problem is that in tiled rendering LO doesn't always consider the
f325b2
document to be modified. Some operations such as Bold, Italic, etc do
f325b2
not mark the document as being modified, but we need to be able to save
f325b2
the changes. This solved the issue by always allowing to save.
f325b2
f325b2
Change-Id: Iaf8120abadc768a07b24f42c287c50080b4e4d89
f325b2
Reviewed-on: https://gerrit.libreoffice.org/17665
f325b2
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
f325b2
Tested-by: Jan Holesovsky <kendy@collabora.com>
f325b2
(cherry picked from commit e5ba9090f4809906ffa1c1dea352161cb988b97f)
f325b2
---
f325b2
 sc/source/ui/unoobj/docuno.cxx    | 4 ++++
f325b2
 sd/source/ui/unoidl/unomodel.cxx  | 4 ++++
f325b2
 sw/source/uibase/uno/unotxdoc.cxx | 4 ++++
f325b2
 3 files changed, 12 insertions(+)
f325b2
f325b2
diff --git a/sc/source/ui/unoobj/docuno.cxx b/sc/source/ui/unoobj/docuno.cxx
f325b2
index e1235b90cb7a..84b2857b6542 100644
f325b2
--- a/sc/source/ui/unoobj/docuno.cxx
f325b2
+++ b/sc/source/ui/unoobj/docuno.cxx
f325b2
@@ -44,6 +44,7 @@
f325b2
 #include <tools/multisel.hxx>
f325b2
 #include <tools/resary.hxx>
f325b2
 #include <toolkit/awt/vclxdevice.hxx>
f325b2
+#include <svtools/miscopt.hxx>
f325b2
 
f325b2
 #include <ctype.h>
f325b2
 #include <float.h>
f325b2
@@ -839,6 +840,9 @@ void ScModelObj::initializeForTiledRendering()
f325b2
     aInputOptions.SetTextWysiwyg(true);
f325b2
     SC_MOD()->SetInputOptions(aInputOptions);
f325b2
     pDocShell->CalcOutputFactor();
f325b2
+    // tdf#93154: in tiled rendering LO doesn't always detect changes
f325b2
+    SvtMiscOptions aMiscOpt;
f325b2
+    aMiscOpt.SetSaveAlwaysAllowed(true);
f325b2
 }
f325b2
 
f325b2
 uno::Any SAL_CALL ScModelObj::queryInterface( const uno::Type& rType )
f325b2
diff --git a/sd/source/ui/unoidl/unomodel.cxx b/sd/source/ui/unoidl/unomodel.cxx
f325b2
index 4148035c899a..0e88a099e081 100644
f325b2
--- a/sd/source/ui/unoidl/unomodel.cxx
f325b2
+++ b/sd/source/ui/unoidl/unomodel.cxx
f325b2
@@ -60,6 +60,7 @@
f325b2
 #include <editeng/unolingu.hxx>
f325b2
 #include <svx/svdpagv.hxx>
f325b2
 #include <svtools/unoimap.hxx>
f325b2
+#include <svtools/miscopt.hxx>
f325b2
 #include <svx/unoshape.hxx>
f325b2
 #include <editeng/unonrule.hxx>
f325b2
 #include <editeng/eeitem.hxx>
f325b2
@@ -2388,6 +2389,9 @@ void SdXImpressDocument::initializeForTiledRendering()
f325b2
             pWindow->EnableMapMode(false);
f325b2
         }
f325b2
     }
f325b2
+    // tdf#93154: in tiled rendering LO doesn't always detect changes
f325b2
+    SvtMiscOptions aMiscOpt;
f325b2
+    aMiscOpt.SetSaveAlwaysAllowed(true);
f325b2
 }
f325b2
 
f325b2
 void SdXImpressDocument::registerCallback(LibreOfficeKitCallback pCallback, void* pData)
f325b2
diff --git a/sw/source/uibase/uno/unotxdoc.cxx b/sw/source/uibase/uno/unotxdoc.cxx
f325b2
index 0dbde54f9144..d6315d2964ae 100644
f325b2
--- a/sw/source/uibase/uno/unotxdoc.cxx
f325b2
+++ b/sw/source/uibase/uno/unotxdoc.cxx
f325b2
@@ -136,6 +136,7 @@
f325b2
 #include <swdtflvr.hxx>
f325b2
 
f325b2
 #include <svtools/langtab.hxx>
f325b2
+#include <svtools/miscopt.hxx>
f325b2
 #include <map>
f325b2
 #include <set>
f325b2
 #include <vector>
f325b2
@@ -3235,6 +3236,9 @@ void SwXTextDocument::initializeForTiledRendering()
f325b2
     // directly in twips.
f325b2
     SwEditWin& rEditWin = pDocShell->GetView()->GetEditWin();
f325b2
     rEditWin.EnableMapMode(false);
f325b2
+    // tdf#93154: in tiled rendering LO doesn't always detect changes
f325b2
+    SvtMiscOptions aMiscOpt;
f325b2
+    aMiscOpt.SetSaveAlwaysAllowed(true);
f325b2
 }
f325b2
 
f325b2
 void SwXTextDocument::registerCallback(LibreOfficeKitCallback pCallback, void* pData)
f325b2
-- 
f325b2
2.12.0
f325b2