<html>
    <head>
      <base href="https://bugs.documentfoundation.org/">
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_UNCONFIRMED "
   title="UNCONFIRMED - OApplicationController::elementReplaced effectively does nothing"
   href="https://bugs.documentfoundation.org/show_bug.cgi?id=133497">133497</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>OApplicationController::elementReplaced effectively does nothing
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>LibreOffice
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>Inherited From OOo
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>All
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>All
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>UNCONFIRMED
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>medium
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>Base
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>libreoffice-bugs@lists.freedesktop.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>sbergman@redhat.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>lionel@mamane.lu
          </td>
        </tr></table>
      <p>
        <div>
        <pre><<a href="https://git.libreoffice.org/core/+/760c03c8ee16ecfa7620174c0eabc9812cba9a83%5E!/">https://git.libreoffice.org/core/+/760c03c8ee16ecfa7620174c0eabc9812cba9a83%5E!/</a>>
"INTEGRATION: CWS insight01" had introduced
OApplicationController::elementReplaced in
dbaccess/source/ui/app/AppController.cxx as

<span class="quote">> +void SAL_CALL OApplicationController::elementReplaced( const ContainerEvent& _rEvent ) throw(RuntimeException)
> +{
> +    ::vos::OGuard aSolarGuard(Application::GetSolarMutex());
> +    ::osl::MutexGuard aGuard(m_aMutex);
> +
> +    Reference< XNameAccess > xNames(_rEvent.Source, UNO_QUERY);
> +    if ( xNames == m_xCurrentContainer || ::std::find(m_aCurrentSubContainers.begin(),m_aCurrentSubContainers.end(),Reference< XContainer >(xNames,UNO_QUERY)) != m_aCurrentSubContainers.end() )
> +    {
> +        OSL_ENSURE(getContainer(),"View is NULL! -> GPF");
> +        ::rtl::OUString sName;
> +        try
> +        {
> +            _rEvent.Accessor >>= sName;
> +            Reference<XConnection> xConnection;
> +            Reference<XPropertySet> xProp(_rEvent.Element,UNO_QUERY);
> +            ::rtl::OUString sNewName;
> +
> +            ElementType eType = getContainer()->getElementType();
> +            switch( eType )
> +            {
> +                case E_TABLE:
> +                    ensureConnection(xConnection);
> +                    if ( xProp.is() && xConnection.is() )
> +                    {
> +                        sNewName = ::dbaui::composeTableName(xConnection->getMetaData(),xProp,sal_False,::dbtools::eInDataManipulation);
> +                    }
> +                    break;
> +                case E_FORM:
> +                case E_REPORT:
> +                    {
> +                        Reference<XContent> xContent(xNames,UNO_QUERY);
> +                        if ( xContent.is() )
> +                        {
> +                            sName = xContent->getIdentifier()->getContentIdentifier() + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/")) + sName;
> +                        }
> +                    }
> +                    break;
> +            }
> +            //  getContainer()->elementReplaced(getContainer()->getElementType(),sName,sNewName,xConnection);
> +        }
> +        catch( Exception& )
> +        {
> +            OSL_ENSURE(0,"Exception catched");
> +        }
> +    }
> +}</span >

with the call to getContainer()->elementReplaced(...) commented out right from
the start (and the code is still effectively the same today at
<<a href="https://git.libreoffice.org/core/+/6647a167400753df45dba788ed793d55ca0be9f8/dbaccess/source/ui/app/AppController.cxx#1537">https://git.libreoffice.org/core/+/6647a167400753df45dba788ed793d55ca0be9f8/dbaccess/source/ui/app/AppController.cxx#1537</a>>).

That means that all the code in that function effectively does nothing, except
for potentially relevant side effects hidden behind any of its function calls.

The question is whether the function should be removed, or the commented-out
code be enabled.</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>