sfx2/source/doc/objmisc.cxx                     |    3 +--
 starmath/qa/cppunit/test_cursor.cxx             |    1 -
 starmath/qa/cppunit/test_node.cxx               |    1 -
 starmath/qa/cppunit/test_nodetotextvisitors.cxx |    1 -
 4 files changed, 1 insertion(+), 5 deletions(-)

New commits:
commit 4d5fe05d3926d8106f47cac2cfdefac8ec7b36d7
Author:     Julien Nabet <serval2...@yahoo.fr>
AuthorDate: Tue Jun 6 19:40:00 2023 +0200
Commit:     Julien Nabet <serval2...@yahoo.fr>
CommitDate: Tue Jun 6 21:42:20 2023 +0200

    Revert "tdf#146547 Mark read-only docs as modified"
    
    This reverts commit e7e9991fd06ba2e0484ae5e6b6acc323ab8bf66b.
    It generated tdf#155638 "Forms: Form couldn't be closed after it has been 
opened"
    
    Change-Id: I854c194c718cae51fd0081534570269332d119c5
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152685
    Tested-by: Jenkins
    Reviewed-by: Julien Nabet <serval2...@yahoo.fr>

diff --git a/sfx2/source/doc/objmisc.cxx b/sfx2/source/doc/objmisc.cxx
index dd639c36900d..6b86e2163ccb 100644
--- a/sfx2/source/doc/objmisc.cxx
+++ b/sfx2/source/doc/objmisc.cxx
@@ -247,8 +247,7 @@ void SfxObjectShell::EnableSetModified( bool bEnable )
 
 bool SfxObjectShell::IsEnableSetModified() const
 {
-    // Don't allow when user explicitly requested read only (IsLoadReadonly() 
or IsOriginallyLoadedReadOnlyMedium())
-    return pImpl->m_bEnableSetModified && ! (IsLoadReadonly() || 
IsOriginallyLoadedReadOnlyMedium());
+    return pImpl->m_bEnableSetModified && !IsReadOnly();
 }
 
 
diff --git a/starmath/qa/cppunit/test_cursor.cxx 
b/starmath/qa/cppunit/test_cursor.cxx
index 5f4c551675a1..56c673c1bd22 100644
--- a/starmath/qa/cppunit/test_cursor.cxx
+++ b/starmath/qa/cppunit/test_cursor.cxx
@@ -58,7 +58,6 @@ void Test::setUp()
     SmGlobals::ensure();
 
     xDocShRef = new SmDocShell(SfxModelFlags::EMBEDDED_OBJECT);
-    xDocShRef->DoInitNew();
 }
 
 void Test::tearDown()
diff --git a/starmath/qa/cppunit/test_node.cxx 
b/starmath/qa/cppunit/test_node.cxx
index af9ff177f38f..f16f195aa8bc 100644
--- a/starmath/qa/cppunit/test_node.cxx
+++ b/starmath/qa/cppunit/test_node.cxx
@@ -53,7 +53,6 @@ void NodeTest::setUp()
     mxDocShell = new SmDocShell(SfxModelFlags::EMBEDDED_OBJECT |
                                 SfxModelFlags::DISABLE_EMBEDDED_SCRIPTS |
                                 SfxModelFlags::DISABLE_DOCUMENT_RECOVERY);
-    mxDocShell->DoInitNew();
 }
 
 void NodeTest::tearDown()
diff --git a/starmath/qa/cppunit/test_nodetotextvisitors.cxx 
b/starmath/qa/cppunit/test_nodetotextvisitors.cxx
index 11ef5affcc4c..6f714321de82 100644
--- a/starmath/qa/cppunit/test_nodetotextvisitors.cxx
+++ b/starmath/qa/cppunit/test_nodetotextvisitors.cxx
@@ -91,7 +91,6 @@ void Test::setUp()
     SmGlobals::ensure();
 
     xDocShRef = new SmDocShell(SfxModelFlags::EMBEDDED_OBJECT);
-    xDocShRef->DoInitNew();
 }
 
 void Test::tearDown()

Reply via email to