Blob Blame History Raw
From 69aadc54a50352f69457899c176286d3ac66ca7d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= <caolanm@redhat.com>
Date: Sun, 30 Jan 2011 20:38:00 +0000
Subject: [PATCH] Resolves: rhbz#673819 crash on changing position of drawing object in header

The header/footer objects are cunning wrappers to pretend to some parts
of the drawing stuff that there are multiple objects, while in reality
there is only one. So call HasText actually gets a totally different
object from the cast :-(
---
 cui/source/tabpages/swpossizetabpage.cxx |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/cui/source/tabpages/swpossizetabpage.cxx b/cui/source/tabpages/swpossizetabpage.cxx
index ee3add0..9955420 100644
--- a/cui/source/tabpages/swpossizetabpage.cxx
+++ b/cui/source/tabpages/swpossizetabpage.cxx
@@ -1930,7 +1930,10 @@
     }
 
     // this should happen via SID_ATTR_TRANSFORM_AUTOSIZE
-    if( rMarkList.GetMarkCount() == 1 )
+    if( rMarkList.GetMarkCount() != 1 )
+        m_bIsMultiSelection = true;
+#if OSL_DEBUG_LEVEL > 1
+    else
     {
         const SdrObject* pObj = rMarkList.GetMark( 0 )->GetMarkedSdrObj();
         SdrObjKind eKind = (SdrObjKind) pObj->GetObjIdentifier();
@@ -1941,8 +1944,7 @@
             DBG_ERROR("AutoWidth/AutoHeight should be enabled");
         }
     }
-    else
-        m_bIsMultiSelection = true;
+#endif
 
     // use page offset and recalculate
     Point aPt( m_pSdrView->GetSdrPageView()->GetPageOrigin() );