https://bugs.documentfoundation.org/show_bug.cgi?id=145687

Hossein <hoss...@libreoffice.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |sberg...@redhat.com

--- Comment #2 from Hossein <hoss...@libreoffice.org> ---
> I told Writer to open the document License.rtf [1] and pressed the button [
> Edit Document! ].
I can not reproduce this with LibreOffice 7.2. Could you please provide more
information on how to reproduce the problem?

Version: 7.2.4.1 / LibreOffice Community
Build ID: 27d75539669ac387bb498e35313b970b7fe9c4f9
CPU threads: 8; OS: Linux 5.13; UI render: default; VCL: gtk3
Locale: en-US (en_US.UTF-8); UI: en-US
Calc: threaded(In reply to Christopher Yeleighton from comment #0)

$ git grep "Edit Document"
include/sfx2/strings.hrc:#define STR_READONLY_EDIT                      
NC_("STR_READONLY_EDIT", "Edit Document")
sfx2/uiconfig/ui/editdocumentdialog.ui:                <property name="label"
translatable="yes" context="editdocumentdialog|edit">Edit Document</property>

Grepping for the above string ("Edit Document") shows that the document is
read-only for some reason. I tried to open this document in another instance of
LibreOffice, and then try opening it in LibreOffice 7.2 release. After choosing
"Open Read-Only" or "Notify" in the previous popup, each time I pressed the
"Edit Document" button from the notification bar. But, I could not reproduce
this issue.

Are you using WebDAV?

And for the exception, this function handles certain exceptions, and re-throws
some others. So, it should be OK.

See this description:
"Rethrowing an exception (C++ only)
If a catch block cannot handle the particular exception it has caught, you can
rethrow the exception. The rethrow expression (throw without
assignment_expression) causes the originally thrown object to be rethrown.

Because the exception has already been caught at the scope in which the rethrow
expression occurs, it is rethrown out to the next dynamically enclosing try
block. Therefore, it cannot be handled by catch blocks at the scope in which
the rethrow expression occurred. Any catch blocks for the dynamically enclosing
try block have an opportunity to catch the exception."
https://www.ibm.com/docs/en/i/7.4?topic=only-rethrowing-exception-c

bool utl::UCBContentHelper::IsYounger(
    OUString const & younger, OUString const & older)
{
    try {
        return
            convert(
                content(younger).getPropertyValue(
                    "DateModified").
                get<css::util::DateTime>())
            > convert(
                content(older).getPropertyValue(
                    "DateModified").
                get<css::util::DateTime>());
    } catch (css::uno::RuntimeException const &) {
        throw;
    } catch (css::ucb::CommandAbortedException const &) {
        assert(false && "this cannot happen");
        throw;
    } catch (css::uno::Exception const &) {
        TOOLS_INFO_EXCEPTION(
            "unotools.ucbhelper",
            "UCBContentHelper::IsYounger(" << younger << ", " << older << ")");
        return false;
    }
}

-- 
You are receiving this mail because:
You are the assignee for the bug.

Reply via email to