summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOliver Bolte <obo@openoffice.org>2009-09-08 08:54:47 +0000
committerOliver Bolte <obo@openoffice.org>2009-09-08 08:54:47 +0000
commit47b189a5b78253040718e509989c4637743bee9a (patch)
treedcec52408474a14a8c4e935f1069d1fef88d0ed1
parent6664cb3f24f87ca83f891d9940b3b51bf209acc8 (diff)
CWS-TOOLING: integrate CWS dba32f
2009-08-31 10:43:51 +0200 msc r275590 : #no issuezilla available# make the testcase more error proof 2009-08-31 10:43:28 +0200 msc r275589 : #no issuezilla available# make the testcase more error proof 2009-08-31 10:40:33 +0200 msc r275588 : i85993 remove bugid 2009-08-31 10:38:28 +0200 msc r275587 : i100000 2009-08-27 13:27:32 +0200 fs r275476 : #i103882# 2009-08-27 12:47:54 +0200 fs r275474 : #i104544# do not allow re-entrance for impl_ensureControl_nothrow Actually, this is part of the fix only. I also removed the code which triggered this re-entrance (from the grid control implementation), but to ensure it won't happen, again, I added some safety herein. 2009-08-27 12:47:16 +0200 fs r275473 : #i104544# SetState: Do not call Update at the window which we just set text for. It should (sic\!) not be needed, but causes trouble 2009-08-27 10:18:05 +0200 mav r275461 : #i103266# do not allow any stream operation on package streams while commiting the package 2009-08-20 15:25:48 +0200 fs r275184 : #i104362# fall back to a ViewObjectContactOfSdrObj in case we don't have a page view 2009-08-20 15:25:06 +0200 fs r275183 : AUGMENT_LIBRARY_PATH 2009-08-20 15:10:34 +0200 fs r275182 : AUGMENT_LIBRARY_PATH 2009-08-20 09:50:36 +0200 oj r275167 : #i104266# notify propertyforward when new dest was created 2009-08-19 08:01:28 +0200 mav r275133 : #i103266# fix the typo 2009-08-18 22:45:34 +0200 fs r275131 : #i10000# 2009-08-18 13:53:07 +0200 oj r275105 : #i104266# set column settings after alter columns 2009-08-18 13:41:49 +0200 fs r275103 : #i102550# do not interpret names of existing data sources as system path 2009-08-18 13:13:05 +0200 oj r275097 : #i103882# use correct number Format 2009-08-18 12:59:13 +0200 fs r275094 : #i104181# 2009-08-18 09:07:48 +0200 fs r275079 : updated readme to refer to proper 1.1.14 2009-08-18 08:32:31 +0200 oj r275077 : #i104187# wrong default for FirstCellAsLabel corrected 2009-08-18 08:10:00 +0200 oj r275076 : #i104187# dispose status controller to avoid access of dead statusBar in sfx 2009-08-17 21:56:19 +0200 fs r275074 : merge fix for issue #102564# from dba32e 2009-08-17 15:34:40 +0200 fs r275058 : don't set MaxFieldSize to 0 unconditionally 2009-08-17 14:33:57 +0200 oj r275054 : #i103528# patch for bitxtor 2009-08-17 14:12:26 +0200 oj r275051 : #i104160# fix VerticalAlignment 2009-08-17 14:11:47 +0200 oj r275050 : #i104160# fix VerticalAlignment 2009-08-14 15:54:04 +0200 mav r274989 : #i103266# avoid possibility for race condition 2009-08-13 13:52:43 +0200 fs r274939 : improved diagnostics 2009-08-13 13:52:28 +0200 fs r274938 : typo 2009-08-13 12:51:03 +0200 fs r274934 : #i103763# provided by cloph: correct libIDL check when compiling Mozilla 2009-08-13 12:43:23 +0200 fs r274933 : #i103763# provided by cloph: allow to cross-compile prebuilt zips on Mac 2009-08-13 12:41:15 +0200 fs r274932 : #i103371# fire PREPARECLOSEDOC even for embedded objects (why not?) 2009-08-13 12:24:49 +0200 fs r274930 : #i99890# remove 'Insert Control' from the popup menu 2009-08-13 12:23:38 +0200 fs r274929 : #i99890# DoToolboxAction: assert unknown/unimplemented actions 2009-08-13 09:32:07 +0200 fs r274923 : #i103721# 2009-08-13 09:26:32 +0200 fs r274922 : #i99894# provided by dtardon: xforms_nowFunction: use proper memory allocation function 2009-08-13 09:20:21 +0200 fs r274921 : #i103938# provided by cmc: pass proper arguments to OUString::intern 2009-08-12 22:34:28 +0200 fs r274916 : #i104139# when executing a PopupMenu, pass the POPUPMENU_NOMOUSEUPCLOSE flag
-rw-r--r--connectivity/source/commontools/sqlerror.cxx2
-rw-r--r--connectivity/source/drivers/odbcbase/OStatement.cxx12
-rw-r--r--sfx2/source/appl/appcfg.cxx13
-rw-r--r--sfx2/source/doc/objxtor.cxx4
-rw-r--r--sfx2/source/notify/eventsupplier.cxx2
-rw-r--r--svx/source/fmcomp/gridctrl.cxx19
-rw-r--r--svx/source/form/datanavi.cxx28
-rw-r--r--svx/source/form/datanavi.src5
-rw-r--r--svx/source/items/algitem.cxx100
-rw-r--r--svx/source/sdr/contact/viewcontactofunocontrol.cxx4
-rw-r--r--svx/source/sdr/contact/viewobjectcontactofunocontrol.cxx64
11 files changed, 178 insertions, 75 deletions
diff --git a/connectivity/source/commontools/sqlerror.cxx b/connectivity/source/commontools/sqlerror.cxx
index 718ea9e8db..0b8710c495 100644
--- a/connectivity/source/commontools/sqlerror.cxx
+++ b/connectivity/source/commontools/sqlerror.cxx
@@ -277,7 +277,7 @@ namespace connectivity
}
if ( !sState.getLength() )
- sState = ::rtl::OUString::intern( RTL_CONSTASCII_USTRINGPARAM( "S1000" ), RTL_TEXTENCODING_ASCII_US );
+ sState = ::rtl::OUString::intern( RTL_CONSTASCII_USTRINGPARAM( "S1000" ) );
return sState;
}
diff --git a/connectivity/source/drivers/odbcbase/OStatement.cxx b/connectivity/source/drivers/odbcbase/OStatement.cxx
index 344e855903..0b19cfd944 100644
--- a/connectivity/source/drivers/odbcbase/OStatement.cxx
+++ b/connectivity/source/drivers/odbcbase/OStatement.cxx
@@ -94,7 +94,17 @@ OStatement_Base::OStatement_Base(OConnection* _pConnection )
osl_incrementInterlockedCount( &m_refCount );
m_pConnection->acquire();
m_aStatementHandle = m_pConnection->createStatementHandle();
- setMaxFieldSize(0);
+
+ //setMaxFieldSize(0);
+ // Don't do this. By ODBC spec, "0" is the default for the SQL_ATTR_MAX_LENGTH attribute. We once introduced
+ // this line since an PostgreSQL ODBC driver had a default other than 0. However, current drivers (at least 8.3
+ // and later) have a proper default of 0, so there should be no need anymore.
+ // On the other hand, the NotesSQL driver (IBM's ODBC driver for the Lotus Notes series) wrongly interprets
+ // "0" as "0", whereas the ODBC spec says it should in fact mean "unlimited".
+ // So, removing this line seems to be the best option for now.
+ // If we ever again encounter a ODBC driver which needs this option, then we should introduce a data source
+ // setting for it, instead of unconditionally doing it.
+
osl_decrementInterlockedCount( &m_refCount );
}
// -----------------------------------------------------------------------------
diff --git a/sfx2/source/appl/appcfg.cxx b/sfx2/source/appl/appcfg.cxx
index f0b04543d4..c99f00a09d 100644
--- a/sfx2/source/appl/appcfg.cxx
+++ b/sfx2/source/appl/appcfg.cxx
@@ -1043,14 +1043,15 @@ void SfxApplication::NotifyEvent( const SfxEventHint& rEventHint, FASTBOOL bSync
if ( pDoc && ( pDoc->IsPreview() || !pDoc->Get_Impl()->bInitialized ) )
return;
- if ( bSynchron )
- {
#ifdef DBG_UTIL
- ::rtl::OUString aName = SfxEventConfiguration::GetEventName_Impl( rEventHint.GetEventId() );
- ByteString aTmp( "SfxEvent: ");
- aTmp += ByteString( String(aName), RTL_TEXTENCODING_UTF8 );
- DBG_TRACE( aTmp.GetBuffer() );
+ ::rtl::OUString aName = SfxEventConfiguration::GetEventName_Impl( rEventHint.GetEventId() );
+ ByteString aTmp( "SfxEvent: ");
+ aTmp += ByteString( String(aName), RTL_TEXTENCODING_UTF8 );
+ DBG_TRACE( aTmp.GetBuffer() );
#endif
+
+ if ( bSynchron )
+ {
Broadcast(rEventHint);
if ( pDoc )
pDoc->Broadcast( rEventHint );
diff --git a/sfx2/source/doc/objxtor.cxx b/sfx2/source/doc/objxtor.cxx
index 54401d4b4d..569c22cef8 100644
--- a/sfx2/source/doc/objxtor.cxx
+++ b/sfx2/source/doc/objxtor.cxx
@@ -581,6 +581,8 @@ sal_uInt16 SfxObjectShell::PrepareClose
}
}
+ SFX_APP()->NotifyEvent( SfxEventHint(SFX_EVENT_PREPARECLOSEDOC, this) );
+
if( GetCreateMode() == SFX_CREATE_MODE_EMBEDDED )
{
pImp->bPreparedForClose = sal_True;
@@ -594,8 +596,6 @@ sal_uInt16 SfxObjectShell::PrepareClose
while ( pFrame && (pFrame->GetFrameType() & SFXFRAME_SERVER ) )
pFrame = SfxViewFrame::GetNext( *pFrame, this );
- SfxApplication *pSfxApp = SFX_APP();
- pSfxApp->NotifyEvent( SfxEventHint(SFX_EVENT_PREPARECLOSEDOC, this) );
sal_Bool bClose = sal_False;
if ( bUI && IsModified() )
{
diff --git a/sfx2/source/notify/eventsupplier.cxx b/sfx2/source/notify/eventsupplier.cxx
index 9d64f696cb..226da37c66 100644
--- a/sfx2/source/notify/eventsupplier.cxx
+++ b/sfx2/source/notify/eventsupplier.cxx
@@ -708,7 +708,7 @@ void SAL_CALL SfxGlobalEvents_Impl::notifyDocumentEvent( const ::rtl::OUString&
const css::uno::Reference< css::frame::XController2 >& /*_ViewController*/, const css::uno::Any& /*_Supplement*/ )
throw (css::lang::IllegalArgumentException, css::lang::NoSupportException, css::uno::RuntimeException)
{
- // we're a multiplexer only, no change to generate artifical events here
+ // we're a multiplexer only, no chance to generate artifical events here
throw css::lang::NoSupportException(::rtl::OUString(), *this);
}
diff --git a/svx/source/fmcomp/gridctrl.cxx b/svx/source/fmcomp/gridctrl.cxx
index 08a03a6ba3..e3ea3b2a3e 100644
--- a/svx/source/fmcomp/gridctrl.cxx
+++ b/svx/source/fmcomp/gridctrl.cxx
@@ -698,25 +698,6 @@ void DbGridControl::NavigationBar::SetState(sal_uInt16 nWhich)
else
pWnd->SetText(aText);
- {
- vos::OGuard aPaintSafety(Application::GetSolarMutex());
- // we want to update only the window, not our parent, so lock the latter
- // (In fact, if we are in DbGridControl::RecalcRows, perhaps as a result of an setDataSource or
- // a VisibleRowsChanged, the grid will be frozen and a SeekRow triggered implicitly by the update
- // of pWnd will fail.)
- // (the SetUpdateMode call goes to the data window : it's sufficient to prevent SeekRow's, but it
- // avoids the Invalidate which would be triggered by BrowseBox::SetUpdateMode (which lead to massive
- // flicker when scrolling))
- // FS - 06.10.99
-
- // don't use SetUpdateMode in those situations as all necessary paints get lost DG
- // so update only if necessary (DG)
- if (pParent->IsPaintEnabled())
- {
- pWnd->Update();
- pWnd->Flush();
- }
- }
pParent->SetRealRowCount(aText);
} break;
}
diff --git a/svx/source/form/datanavi.cxx b/svx/source/form/datanavi.cxx
index 3b8a0cf8c3..c5af260f72 100644
--- a/svx/source/form/datanavi.cxx
+++ b/svx/source/form/datanavi.cxx
@@ -452,9 +452,11 @@ namespace svxform
bool bIsDocModified = false;
m_pNaviWin->DisableNotify( true );
- if ( TBI_ITEM_ADD == _nToolBoxID
- || TBI_ITEM_ADD_ELEMENT == _nToolBoxID
- || TBI_ITEM_ADD_ATTRIBUTE == _nToolBoxID )
+ switch ( _nToolBoxID )
+ {
+ case TBI_ITEM_ADD:
+ case TBI_ITEM_ADD_ELEMENT:
+ case TBI_ITEM_ADD_ATTRIBUTE:
{
bHandled = true;
Reference< css::xforms::XModel > xModel( m_xUIHelper, UNO_QUERY );
@@ -643,7 +645,9 @@ namespace svxform
}
}
}
- else if ( TBI_ITEM_EDIT == _nToolBoxID )
+ break;
+
+ case TBI_ITEM_EDIT:
{
bHandled = true;
SvLBoxEntry* pEntry = m_aItemList.FirstSelected();
@@ -737,7 +741,9 @@ namespace svxform
}
}
}
- else if ( TBI_ITEM_REMOVE == _nToolBoxID )
+ break;
+
+ case TBI_ITEM_REMOVE:
{
bHandled = true;
if ( DGTInstance == m_eGroup && m_sInstanceURL.Len() > 0 )
@@ -748,6 +754,18 @@ namespace svxform
}
bIsDocModified = RemoveEntry();
}
+ break;
+
+ case MID_INSERT_CONTROL:
+ {
+ OSL_ENSURE( false, "XFormsPage::DoToolboxAction: MID_INSERT_CONTROL not implemented, yet!" );
+ }
+ break;
+
+ default:
+ OSL_ENSURE( false, "XFormsPage::DoToolboxAction: unknown ID!" );
+ break;
+ }
m_pNaviWin->DisableNotify( false );
EnableMenuItems( NULL );
diff --git a/svx/source/form/datanavi.src b/svx/source/form/datanavi.src
index aabb613833..64bc690839 100644
--- a/svx/source/form/datanavi.src
+++ b/svx/source/form/datanavi.src
@@ -512,7 +512,8 @@ Menu RID_MENU_DATANAVIGATOR
{
ItemList =
{
- MenuItem
+ // MID_INSERT_CONTROL not implemented, yet (#i99890#)
+ /*MenuItem
{
Identifier = MID_INSERT_CONTROL ;
HelpId = HID_XFORMS_MID_INSERT_CONTROL ;
@@ -521,7 +522,7 @@ Menu RID_MENU_DATANAVIGATOR
MenuItem
{
Separator = TRUE;
- };
+ };*/
MenuItem
{
Identifier = TBI_ITEM_ADD ;
diff --git a/svx/source/items/algitem.cxx b/svx/source/items/algitem.cxx
index b23ddbb550..4ce57b6603 100644
--- a/svx/source/items/algitem.cxx
+++ b/svx/source/items/algitem.cxx
@@ -45,6 +45,7 @@
#include <com/sun/star/table/TableOrientation.hpp>
#include <com/sun/star/table/CellHoriJustify.hpp>
#include <com/sun/star/style/ParagraphAdjust.hpp>
+#include "com/sun/star/style/VerticalAlignment.hpp"
#include <com/sun/star/util/SortField.hpp>
#include <com/sun/star/util/SortFieldType.hpp>
#include <com/sun/star/table/CellOrientation.hpp>
@@ -275,42 +276,89 @@ SfxItemPresentation SvxVerJustifyItem::GetPresentation
//------------------------------------------------------------------------
-sal_Bool SvxVerJustifyItem::QueryValue( uno::Any& rVal, BYTE /*nMemberId*/ ) const
+sal_Bool SvxVerJustifyItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const
{
- table::CellVertJustify eUno = table::CellVertJustify_STANDARD;
- switch ( (SvxCellVerJustify)GetValue() )
+ nMemberId &= ~CONVERT_TWIPS;
+ switch ( nMemberId )
{
- case SVX_VER_JUSTIFY_STANDARD: eUno = table::CellVertJustify_STANDARD; break;
- case SVX_VER_JUSTIFY_TOP: eUno = table::CellVertJustify_TOP; break;
- case SVX_VER_JUSTIFY_CENTER: eUno = table::CellVertJustify_CENTER; break;
- case SVX_VER_JUSTIFY_BOTTOM: eUno = table::CellVertJustify_BOTTOM; break;
- default: ; //prevent warning
+ case MID_HORJUST_ADJUST:
+ {
+ style::VerticalAlignment eUno = style::VerticalAlignment_TOP;
+ switch ( (SvxCellVerJustify)GetValue() )
+ {
+ case SVX_VER_JUSTIFY_TOP: eUno = style::VerticalAlignment_TOP; break;
+ case SVX_VER_JUSTIFY_CENTER: eUno = style::VerticalAlignment_MIDDLE; break;
+ case SVX_VER_JUSTIFY_BOTTOM: eUno = style::VerticalAlignment_BOTTOM; break;
+ default: ; //prevent warning
+ }
+ rVal <<= eUno;
+ break;
+ }
+ default:
+ {
+ table::CellVertJustify eUno = table::CellVertJustify_STANDARD;
+ switch ( (SvxCellVerJustify)GetValue() )
+ {
+ case SVX_VER_JUSTIFY_STANDARD: eUno = table::CellVertJustify_STANDARD; break;
+ case SVX_VER_JUSTIFY_TOP: eUno = table::CellVertJustify_TOP; break;
+ case SVX_VER_JUSTIFY_CENTER: eUno = table::CellVertJustify_CENTER; break;
+ case SVX_VER_JUSTIFY_BOTTOM: eUno = table::CellVertJustify_BOTTOM; break;
+ default: ; //prevent warning
+ }
+ rVal <<= eUno;
+ break;
+ }
}
- rVal <<= eUno;
return sal_True;
}
-sal_Bool SvxVerJustifyItem::PutValue( const uno::Any& rVal, BYTE /*nMemberId*/ )
+sal_Bool SvxVerJustifyItem::PutValue( const uno::Any& rVal, BYTE nMemberId )
{
- table::CellVertJustify eUno;
- if(!(rVal >>= eUno))
+ nMemberId &= ~CONVERT_TWIPS;
+ switch ( nMemberId )
{
- sal_Int32 nValue = 0;
- if(!(rVal >>= nValue))
- return sal_False;
- eUno = (table::CellVertJustify)nValue;
- }
+ case MID_HORJUST_ADJUST:
+ {
+ // property contains ParagraphAdjust values as sal_Int16
+ style::VerticalAlignment nVal = style::VerticalAlignment_TOP;
+ if(!(rVal >>= nVal))
+ return sal_False;
- SvxCellVerJustify eSvx = SVX_VER_JUSTIFY_STANDARD;
- switch (eUno)
- {
- case table::CellVertJustify_STANDARD: eSvx = SVX_VER_JUSTIFY_STANDARD; break;
- case table::CellVertJustify_TOP: eSvx = SVX_VER_JUSTIFY_TOP; break;
- case table::CellVertJustify_CENTER: eSvx = SVX_VER_JUSTIFY_CENTER; break;
- case table::CellVertJustify_BOTTOM: eSvx = SVX_VER_JUSTIFY_BOTTOM; break;
- default: ; //prevent warning
+ SvxCellVerJustify eSvx = SVX_VER_JUSTIFY_STANDARD;
+ switch (nVal)
+ {
+ case style::VerticalAlignment_TOP: eSvx = SVX_VER_JUSTIFY_TOP; break;
+ case style::VerticalAlignment_MIDDLE: eSvx = SVX_VER_JUSTIFY_CENTER; break;
+ case style::VerticalAlignment_BOTTOM: eSvx = SVX_VER_JUSTIFY_BOTTOM; break;
+ default:;
+ }
+ SetValue( (USHORT)eSvx );
+ break;
+ }
+ default:
+ {
+ table::CellVertJustify eUno;
+ if(!(rVal >>= eUno))
+ {
+ sal_Int32 nValue = 0;
+ if(!(rVal >>= nValue))
+ return sal_False;
+ eUno = (table::CellVertJustify)nValue;
+ }
+
+ SvxCellVerJustify eSvx = SVX_VER_JUSTIFY_STANDARD;
+ switch (eUno)
+ {
+ case table::CellVertJustify_STANDARD: eSvx = SVX_VER_JUSTIFY_STANDARD; break;
+ case table::CellVertJustify_TOP: eSvx = SVX_VER_JUSTIFY_TOP; break;
+ case table::CellVertJustify_CENTER: eSvx = SVX_VER_JUSTIFY_CENTER; break;
+ case table::CellVertJustify_BOTTOM: eSvx = SVX_VER_JUSTIFY_BOTTOM; break;
+ default: ; //prevent warning
+ }
+ SetValue( (USHORT)eSvx );
+ break;
+ }
}
- SetValue( (USHORT)eSvx );
return sal_True;
}
diff --git a/svx/source/sdr/contact/viewcontactofunocontrol.cxx b/svx/source/sdr/contact/viewcontactofunocontrol.cxx
index 044e55ead2..5c23e3e1fe 100644
--- a/svx/source/sdr/contact/viewcontactofunocontrol.cxx
+++ b/svx/source/sdr/contact/viewcontactofunocontrol.cxx
@@ -148,7 +148,9 @@ namespace sdr { namespace contact {
return *new UnoControlWindowContact( *pPageViewContact, *this );
}
- return *new UnoControlDefaultContact( _rObjectContact, *this );
+ // if we're not working for a ObjectContactOfPageView, then we can't use a ViewObjectContactOfUnoControl, or any
+ // of its derivees. Fall back to a "normal" SdrObj's contact object.
+ return *new ViewObjectContactOfSdrObj( _rObjectContact, *this );
}
//--------------------------------------------------------------------
diff --git a/svx/source/sdr/contact/viewobjectcontactofunocontrol.cxx b/svx/source/sdr/contact/viewobjectcontactofunocontrol.cxx
index 2ba50855ae..90295f7ce6 100644
--- a/svx/source/sdr/contact/viewobjectcontactofunocontrol.cxx
+++ b/svx/source/sdr/contact/viewobjectcontactofunocontrol.cxx
@@ -30,12 +30,18 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_svx.hxx"
+
#include <svx/sdr/contact/viewobjectcontactofunocontrol.hxx>
#include <svx/sdr/contact/viewcontactofunocontrol.hxx>
#include <svx/sdr/contact/displayinfo.hxx>
#include <svx/sdr/properties/properties.hxx>
#include <svx/sdr/contact/objectcontactofpageview.hxx>
#include <svx/sdr/primitive2d/svx_primitivetypes2d.hxx>
+#include <svx/svdouno.hxx>
+#include <svx/svdpagv.hxx>
+#include <svx/svdview.hxx>
+#include <svx/sdrpagewindow.hxx>
+#include "sdrpaintwindow.hxx"
/** === begin UNO includes === **/
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
@@ -53,23 +59,21 @@
#include <com/sun/star/container/XContainerListener.hpp>
#include <com/sun/star/container/XContainer.hpp>
/** === end UNO includes === **/
-#include <svx/svdouno.hxx>
-#include <svx/svdpagv.hxx>
-#include <svx/svdview.hxx>
-#include <svx/sdrpagewindow.hxx>
-#include "sdrpaintwindow.hxx"
+
#include <toolkit/helper/formpdfexport.hxx>
#include <vcl/pdfextoutdevdata.hxx>
#include <vcl/svapp.hxx>
#include <vos/mutex.hxx>
#include <comphelper/processfactory.hxx>
+#include <comphelper/scopeguard.hxx>
#include <cppuhelper/implbase4.hxx>
#include <toolkit/helper/vclunohelper.hxx>
#include <tools/diagnose_ex.h>
-
#include <basegfx/matrix/b2dhommatrix.hxx>
#include <drawinglayer/primitive2d/controlprimitive2d.hxx>
+
#include <boost/shared_ptr.hpp>
+#include <boost/bind.hpp>
//........................................................................
namespace sdr { namespace contact {
@@ -220,10 +224,17 @@ namespace sdr { namespace contact {
void ControlHolder::setPosSize( const Rectangle& _rPosSize ) const
{
// no check whether we're valid, this is the responsibility of the caller
- m_xControlWindow->setPosSize(
- _rPosSize.Left(), _rPosSize.Top(), _rPosSize.GetWidth(), _rPosSize.GetHeight(),
- POSSIZE
- );
+
+ // don't call setPosSize when pos/size did not change
+ // #i104181# / 2009-08-18 / frank.schoenheit@sun.com
+ ::Rectangle aCurrentRect( getPosSize() );
+ if ( aCurrentRect != _rPosSize )
+ {
+ m_xControlWindow->setPosSize(
+ _rPosSize.Left(), _rPosSize.Top(), _rPosSize.GetWidth(), _rPosSize.GetHeight(),
+ POSSIZE
+ );
+ }
}
//--------------------------------------------------------------------
@@ -447,7 +458,10 @@ namespace sdr { namespace contact {
{
private:
/// the instance whose IMPL we are
- ViewObjectContactOfUnoControl* m_pAntiImpl;
+ ViewObjectContactOfUnoControl* m_pAntiImpl;
+
+ /// are we currently inside impl_ensureControl_nothrow?
+ bool m_bCreatingControl;
/** thread safety
@@ -830,6 +844,7 @@ namespace sdr { namespace contact {
//--------------------------------------------------------------------
ViewObjectContactOfUnoControl_Impl::ViewObjectContactOfUnoControl_Impl( ViewObjectContactOfUnoControl* _pAntiImpl )
:m_pAntiImpl( _pAntiImpl )
+ ,m_bCreatingControl( false )
,m_pOutputDeviceForWindow( NULL )
,m_bControlIsVisible( false )
,m_bIsDesignModeListening( false )
@@ -971,9 +986,36 @@ namespace sdr { namespace contact {
return rPageWindow.GetPaintWindow().GetOutputDevice();
}
+ namespace
+ {
+ static void lcl_resetFlag( bool& rbFlag )
+ {
+ rbFlag = false;
+ }
+ }
+
//--------------------------------------------------------------------
bool ViewObjectContactOfUnoControl_Impl::impl_ensureControl_nothrow( IPageViewAccess& _rPageView, const OutputDevice& _rDevice )
{
+ if ( m_bCreatingControl )
+ {
+ OSL_ENSURE( false, "ViewObjectContactOfUnoControl_Impl::impl_ensureControl_nothrow: reentrance is not really good here!" );
+ // We once had a situation where this was called reentrantly, which lead to all kind of strange effects. All
+ // those affected the grid control, which is the only control so far which is visible in design mode (and
+ // not only in alive mode).
+ // Creating the control triggered an Window::Update on some of its child windows, which triggered a
+ // Paint on parent of the grid control (e.g. the SwEditWin), which triggered a reentrant call to this method,
+ // which it is not really prepared for.
+ //
+ // /me thinks that re-entrance should be caught on a higher level, i.e. the Drawing Layer should not allow
+ // reentrant paint requests. For the moment, until /me can discuss this with AW, catch it here.
+ // 2009-08-27 / #i104544# frank.schoenheit@sun.com
+ return false;
+ }
+
+ m_bCreatingControl = true;
+ ::comphelper::ScopeGuard aGuard( ::boost::bind( lcl_resetFlag, ::boost::ref( m_bCreatingControl ) ) );
+
if ( m_aControl.is() )
{
if ( m_pOutputDeviceForWindow == &_rDevice )