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:
+3
-2
@@ -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.
|
||||
|
||||
|
||||
@@ -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");
|
||||
|
||||
|
||||
@@ -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()};
|
||||
|
||||
Reference in New Issue
Block a user