[Libreoffice-commits] core.git: svx/source
Noel Grandin (via logerrit)
logerrit at kemper.freedesktop.org
Mon May 10 18:51:11 UTC 2021
svx/source/unodraw/unoshtxt.cxx | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
New commits:
commit 5aa48d61f82b2cbaa8995350e8c8d448d300c264
Author: Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Mon May 10 19:24:40 2021 +0200
Commit: Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Mon May 10 20:50:24 2021 +0200
reduce frequency of dynamic_cast
by checking cheaper things first
Change-Id: I0c93021966ee09967f0ce2e265adafb279b669bd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115356
Tested-by: Noel Grandin <noel.grandin at collabora.co.uk>
Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
diff --git a/svx/source/unodraw/unoshtxt.cxx b/svx/source/unodraw/unoshtxt.cxx
index 39cad52c073b..0cc8baffa233 100644
--- a/svx/source/unodraw/unoshtxt.cxx
+++ b/svx/source/unodraw/unoshtxt.cxx
@@ -108,8 +108,10 @@ private:
bool HasView() const { return mpView != nullptr; }
bool IsEditMode() const
{
+ if (!mbShapeIsEditMode)
+ return false;
SdrTextObj* pTextObj = dynamic_cast<SdrTextObj*>( mpObject );
- return mbShapeIsEditMode && pTextObj && pTextObj->IsTextEditActive();
+ return pTextObj && pTextObj->IsTextEditActive();
}
void dispose();
More information about the Libreoffice-commits
mailing list