LOCRDT sfx2: only connect with env var YRSCONNECT

Change-Id: Icf5d5d0c647260febd2b3c8cee626ca50833aefe
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/185330
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
This commit is contained in:
Michael Stahl
2025-05-20 09:42:22 +02:00
parent 1c1bd41cf6
commit d3235480c5
3 changed files with 7 additions and 4 deletions
+3 -2
View File
@@ -29,8 +29,9 @@ Currently, communication happens over a hard-coded pipe:
(you can also create a new Writer document but that will be boring if all
you can do is insert comments into empty doc)
* start another soffice with a different user profile, create new Writer
document, and it will connect and load the document from the other side
* start another soffice YRSCONNECT=1 with a different user profile, create
new Writer document, and it will connect and load the document from the
other side
All sorts of paragraph and character formattings should work inside comments.
+3 -1
View File
@@ -634,7 +634,9 @@ sal_Bool SAL_CALL SfxFrameLoader_Impl::load( const Sequence< PropertyValue >& rA
#if ENABLE_YRS
uno::Reference<connection::XConnection> xConnection;
if (!xModel.is() && aDescriptor.getOrDefault(u"URL"_ustr, OUString()) == "private:factory/swriter" && !getenv("YRSACCEPT"))
if (!xModel.is()
&& aDescriptor.getOrDefault(u"URL"_ustr, OUString()) == "private:factory/swriter"
&& getenv("YRSCONNECT"))
{
SAL_INFO("sfx.yrs", "YRS connect sfx2");
+1 -1
View File
@@ -1586,7 +1586,7 @@ void DocumentStateManager::SetModified()
#if ENABLE_YRS
void DocumentStateManager::YrsCommitModified()
{
if (m_pYrsSupplier->CommitTransaction())
if (m_pYrsSupplier->CommitTransaction() && m_pYrsReader.is())
{
uno::Sequence<sal_Int8> buf(5);
sal_Int8 * it{buf.getArray()};