svx/source/sdr/contact/viewcontactofgraphic.cxx |   13 ++++---------
 1 file changed, 4 insertions(+), 9 deletions(-)

New commits:
commit 2340639df07755a1d67fb59b52a9ece65f279f4a
Author:     Caolán McNamara <[email protected]>
AuthorDate: Sun Dec 5 16:53:22 2021 +0000
Commit:     Caolán McNamara <[email protected]>
CommitDate: Sun Dec 5 20:10:32 2021 +0100

    cid#1494630 #4 rearrange to demo Logically dead code
    
    Change-Id: I3d7efa59ecaf21a582644594f26a1d2116d1965c
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126387
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <[email protected]>

diff --git a/svx/source/sdr/contact/viewcontactofgraphic.cxx 
b/svx/source/sdr/contact/viewcontactofgraphic.cxx
index aeebfabdc442..dd4afd9ba64e 100644
--- a/svx/source/sdr/contact/viewcontactofgraphic.cxx
+++ b/svx/source/sdr/contact/viewcontactofgraphic.cxx
@@ -326,8 +326,7 @@ namespace sdr::contact
             // accordingly. The created bitmapPrimitive WILL use the rotation, 
too.
             if (bRota180)
             {
-                const sal_uInt16 nMirrorCase(bMirrored ? 3 : 4);
-                bHMirr = 4 == nMirrorCase;
+                bHMirr = !bMirrored;
 
                 // if bRota180 which is used for vertical mirroring, the 
graphic will already be rotated
                 // by 180 degrees. To correct, switch off VMirror and invert 
HMirroring.
@@ -335,8 +334,7 @@ namespace sdr::contact
             }
             else
             {
-                const sal_uInt16 nMirrorCase(bMirrored ? 2 : 1);
-                bHMirr = 2 == nMirrorCase;
+                bHMirr = bMirrored;
             }
 
             if (bHMirr)
commit 50b8dacd0b53b694e14b2982968e3eebd0d5cbb6
Author:     Caolán McNamara <[email protected]>
AuthorDate: Sun Dec 5 16:50:33 2021 +0000
Commit:     Caolán McNamara <[email protected]>
CommitDate: Sun Dec 5 20:10:18 2021 +0100

    cid#1494630 Logically dead code
    
    Change-Id: I02022ee4a0524accbe33fd2da3dc971f434b0d83
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126386
    Tested-by: Caolán McNamara <[email protected]>
    Reviewed-by: Caolán McNamara <[email protected]>

diff --git a/svx/source/sdr/contact/viewcontactofgraphic.cxx 
b/svx/source/sdr/contact/viewcontactofgraphic.cxx
index d2e21ed0d487..aeebfabdc442 100644
--- a/svx/source/sdr/contact/viewcontactofgraphic.cxx
+++ b/svx/source/sdr/contact/viewcontactofgraphic.cxx
@@ -319,7 +319,6 @@ namespace sdr::contact
             const bool bMirrored(GetGrafObject().IsMirrored());
 
             bool bHMirr;
-            bool bVMirr;
 
             // set mirror flags at LocalGrafInfo. Take into account that the 
geometry in
             // aObjectRange is already changed and rotated when bRota180 is 
used. To rebuild
@@ -333,18 +332,16 @@ namespace sdr::contact
                 // if bRota180 which is used for vertical mirroring, the 
graphic will already be rotated
                 // by 180 degrees. To correct, switch off VMirror and invert 
HMirroring.
                 bHMirr = !bHMirr;
-                bVMirr = false;
             }
             else
             {
                 const sal_uInt16 nMirrorCase(bMirrored ? 2 : 1);
                 bHMirr = 2 == nMirrorCase;
-                bVMirr = false;
             }
 
-            if(bHMirr || bVMirr)
+            if (bHMirr)
             {
-                aLocalGrafInfo.SetMirrorFlags((bHMirr ? 
BmpMirrorFlags::Horizontal : BmpMirrorFlags::NONE)|(bVMirr ? 
BmpMirrorFlags::Vertical : BmpMirrorFlags::NONE));
+                aLocalGrafInfo.SetMirrorFlags(BmpMirrorFlags::Horizontal);
             }
 
             // fill object matrix

Reply via email to