[ooo-build-commit] Branch 'ooo/OOO320' - sc/source
Jan Holesovsky
kendy at kemper.freedesktop.org
Fri Nov 20 17:22:40 PST 2009
sc/source/ui/Accessibility/AccessibleText.cxx | 16 ++++-----
sc/source/ui/app/inputwin.cxx | 43 ++++++++++++++++----------
sc/source/ui/app/makefile.mk | 3 +
sc/source/ui/inc/inputwin.hxx | 15 ++++-----
sc/source/ui/unoobj/docuno.cxx | 3 +
5 files changed, 47 insertions(+), 33 deletions(-)
New commits:
commit f6017bd72c829c6b9b8f7be6bd5cdfadb2786f62
Author: Ivo Hinkelmann <ihi at openoffice.org>
Date: Fri Nov 20 13:02:34 2009 +0000
CWS-TOOLING: integrate CWS calc32stopper5
2009-11-12 13:18:26 +0100 dr r277477 : #i105267# missing in exception files list
2009-11-12 11:13:57 +0100 dr r277472 : CWS-TOOLING: rebase CWS calc32stopper5 to branches/OOO320 at 277373 (milestone: OOO320:m4)
2009-11-11 17:27:10 +0100 dr r277466 : #i105267# remember all existing copies of ScAccessibeEditLineTextData in the ScTextWnd instance (text input line)
2009-11-04 09:59:49 +0100 dr r277334 : dump even more BIFF records written by XL12
2009-10-27 19:11:37 +0100 dr r277231 : few dumper additions
2009-10-27 17:17:10 +0100 nn r277225 : #i106343# check if pDocShell is set in GetFormatter
2009-10-26 14:54:15 +0100 dr r277178 : #i106194# OOXML: load form controls from binary streams
2009-10-26 14:14:01 +0100 dr r277177 : #i106194# OOXML: load form controls from binary streams
diff --git a/sc/source/ui/Accessibility/AccessibleText.cxx b/sc/source/ui/Accessibility/AccessibleText.cxx
index 864168d..57abb5b 100644
--- a/sc/source/ui/Accessibility/AccessibleText.cxx
+++ b/sc/source/ui/Accessibility/AccessibleText.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2008 by Sun Microsystems, Inc.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -1181,7 +1181,7 @@ ScAccessibleEditLineTextData::ScAccessibleEditLineTextData(EditView* pEditView,
ScTextWnd* pTxtWnd = (ScTextWnd*)pWin;
if (pTxtWnd)
- pTxtWnd->SetAccessibleTextData(this);
+ pTxtWnd->InsertAccessibleTextData( *this );
}
ScAccessibleEditLineTextData::~ScAccessibleEditLineTextData()
@@ -1189,7 +1189,7 @@ ScAccessibleEditLineTextData::~ScAccessibleEditLineTextData()
ScTextWnd* pTxtWnd = (ScTextWnd*)mpWindow;
if (pTxtWnd)
- pTxtWnd->SetAccessibleTextData(NULL);
+ pTxtWnd->RemoveAccessibleTextData( *this );
if (mbEditEngineCreated && mpEditEngine)
{
@@ -1210,7 +1210,7 @@ void ScAccessibleEditLineTextData::Dispose()
ScTextWnd* pTxtWnd = (ScTextWnd*)mpWindow;
if (pTxtWnd)
- pTxtWnd->SetAccessibleTextData(NULL);
+ pTxtWnd->RemoveAccessibleTextData( *this );
ResetEditMode();
mpWindow = NULL;
@@ -1415,11 +1415,11 @@ SvxViewForwarder* ScAccessiblePreviewCellTextData::GetViewForwarder()
//UNUSED2008-05 if( aNotify )
//UNUSED2008-05 {
//UNUSED2008-05 ::std::auto_ptr< SfxHint > aHint = SvxEditSourceHelper::EENotification2Hint( aNotify);
-//UNUSED2008-05
+//UNUSED2008-05
//UNUSED2008-05 if( aHint.get() )
//UNUSED2008-05 GetBroadcaster().Broadcast( *aHint.get() );
//UNUSED2008-05 }
-//UNUSED2008-05
+//UNUSED2008-05
//UNUSED2008-05 return 0;
//UNUSED2008-05 }
@@ -1543,11 +1543,11 @@ SvxViewForwarder* ScAccessiblePreviewHeaderCellTextData::GetViewForwarder()
//UNUSED2008-05 if( aNotify )
//UNUSED2008-05 {
//UNUSED2008-05 ::std::auto_ptr< SfxHint > aHint = SvxEditSourceHelper::EENotification2Hint( aNotify);
-//UNUSED2008-05
+//UNUSED2008-05
//UNUSED2008-05 if( aHint.get() )
//UNUSED2008-05 GetBroadcaster().Broadcast( *aHint.get() );
//UNUSED2008-05 }
-//UNUSED2008-05
+//UNUSED2008-05
//UNUSED2008-05 return 0;
//UNUSED2008-05 }
diff --git a/sc/source/ui/app/inputwin.cxx b/sc/source/ui/app/inputwin.cxx
index 80625f0..e265541 100644
--- a/sc/source/ui/app/inputwin.cxx
+++ b/sc/source/ui/app/inputwin.cxx
@@ -31,9 +31,7 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sc.hxx"
-
-
-//------------------------------------------------------------------
+#include <algorithm>
#include "scitems.hxx"
#include <svx/eeitem.hxx>
@@ -626,7 +624,7 @@ String __EXPORT ScInputWindow::GetText() const
//UNUSED2008-05 aTextWindow.SetTextString( rText );
//UNUSED2008-05 aTextWindow.GetEditView()->SetSelection( rSel );
//UNUSED2008-05 }
-//UNUSED2008-05
+//UNUSED2008-05
//UNUSED2008-05 return aTextWindow.GetEditView();
//UNUSED2008-05 }
@@ -738,7 +736,6 @@ ScTextWnd::ScTextWnd( Window* pParent )
DragSourceHelper( this ),
pEditEngine ( NULL ),
pEditView ( NULL ),
- pAccTextData ( NULL ),
bIsInsertMode( TRUE ),
bFormulaMode ( FALSE ),
bInputMode ( FALSE )
@@ -774,8 +771,8 @@ __EXPORT ScTextWnd::~ScTextWnd()
{
delete pEditView;
delete pEditEngine;
- if (pAccTextData)
- pAccTextData->Dispose();
+ for( AccTextDataVector::reverse_iterator aIt = maAccTextDatas.rbegin(), aEnd = maAccTextDatas.rend(); aIt != aEnd; ++aIt )
+ (*aIt)->Dispose();
}
void __EXPORT ScTextWnd::Paint( const Rectangle& rRec )
@@ -1112,8 +1109,8 @@ void ScTextWnd::StartEditEngine()
pEditEngine->SetModifyHdl(LINK(this, ScTextWnd, NotifyHdl));
- if (pAccTextData)
- pAccTextData->StartEdit();
+ if (!maAccTextDatas.empty())
+ maAccTextDatas.back()->StartEdit();
// as long as EditEngine and DrawText sometimes differ for CTL text,
// repaint now to have the EditEngine's version visible
@@ -1154,8 +1151,8 @@ void ScTextWnd::StopEditEngine( BOOL bAll )
{
if (pEditView)
{
- if (pAccTextData)
- pAccTextData->EndEdit();
+ if (!maAccTextDatas.empty())
+ maAccTextDatas.back()->EndEdit();
ScModule* pScMod = SC_MOD();
@@ -1259,8 +1256,8 @@ void ScTextWnd::SetTextString( const String& rNewString )
aString = rNewString;
- if (pAccTextData)
- pAccTextData->TextChanged();
+ if (!maAccTextDatas.empty())
+ maAccTextDatas.back()->TextChanged();
bInputMode = FALSE;
}
@@ -1317,8 +1314,8 @@ void ScTextWnd::MakeDialogEditView()
if ( bIsRTL )
lcl_ModifyRTLVisArea( pEditView );
- if (pAccTextData)
- pAccTextData->StartEdit();
+ if (!maAccTextDatas.empty())
+ maAccTextDatas.back()->StartEdit();
}
void ScTextWnd::ImplInitSettings()
@@ -1343,6 +1340,22 @@ void ScTextWnd::ImplInitSettings()
rtl::OUString(String(ScResId(STR_ACC_EDITLINE_DESCR))), EditLine);
}
+void ScTextWnd::InsertAccessibleTextData( ScAccessibleEditLineTextData& rTextData )
+{
+ OSL_ENSURE( ::std::find( maAccTextDatas.begin(), maAccTextDatas.end(), &rTextData ) == maAccTextDatas.end(),
+ "ScTextWnd::InsertAccessibleTextData - passed object already registered" );
+ maAccTextDatas.push_back( &rTextData );
+}
+
+void ScTextWnd::RemoveAccessibleTextData( ScAccessibleEditLineTextData& rTextData )
+{
+ AccTextDataVector::iterator aEnd = maAccTextDatas.end();
+ AccTextDataVector::iterator aIt = ::std::find( maAccTextDatas.begin(), aEnd, &rTextData );
+ OSL_ENSURE( aIt != aEnd, "ScTextWnd::RemoveAccessibleTextData - passed object not registered" );
+ if( aIt != aEnd )
+ maAccTextDatas.erase( aIt );
+}
+
// -----------------------------------------------------------------------
void ScTextWnd::DataChanged( const DataChangedEvent& rDCEvt )
diff --git a/sc/source/ui/app/makefile.mk b/sc/source/ui/app/makefile.mk
index 4f3c2bd..1dbac01 100644
--- a/sc/source/ui/app/makefile.mk
+++ b/sc/source/ui/app/makefile.mk
@@ -63,7 +63,8 @@ EXCEPTIONSFILES= \
$(SLO)$/drwtrans.obj \
$(SLO)$/scmod2.obj \
$(SLO)$/scmod.obj \
- $(SLO)$/client.obj
+ $(SLO)$/client.obj \
+ $(SLO)$/inputwin.obj
#LIB3TARGET=$(SLB)$/ysclib.lib
#LIB3OBJFILES=$(SLO)$/sclib.obj
diff --git a/sc/source/ui/inc/inputwin.hxx b/sc/source/ui/inc/inputwin.hxx
index e162fbf..52ef004 100644
--- a/sc/source/ui/inc/inputwin.hxx
+++ b/sc/source/ui/inc/inputwin.hxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2008 by Sun Microsystems, Inc.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -31,15 +31,11 @@
#ifndef SC_INPUTWIN_HXX
#define SC_INPUTWIN_HXX
-
-#ifndef _TOOLBOX_HXX //autogen
+#include <vector>
#include <vcl/toolbox.hxx>
-#endif
#include <sfx2/childwin.hxx>
#include <svtools/lstner.hxx>
-#ifndef _COMBOBOX_HXX //autogen
#include <vcl/combobox.hxx>
-#endif
#include <vcl/window.hxx>
#include <svtools/transfer.hxx>
@@ -77,7 +73,8 @@ public:
virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > CreateAccessible();
- void SetAccessibleTextData(ScAccessibleEditLineTextData* pTextData) {pAccTextData = pTextData;}
+ void InsertAccessibleTextData( ScAccessibleEditLineTextData& rTextData );
+ void RemoveAccessibleTextData( ScAccessibleEditLineTextData& rTextData );
DECL_LINK( NotifyHdl, EENotify* );
@@ -102,11 +99,13 @@ private:
void UpdateAutoCorrFlag();
private:
+ typedef ::std::vector< ScAccessibleEditLineTextData* > AccTextDataVector;
+
String aString;
Font aTextFont;
ScEditEngineDefaulter* pEditEngine; // erst bei Bedarf angelegt
EditView* pEditView;
- ScAccessibleEditLineTextData* pAccTextData;
+ AccTextDataVector maAccTextDatas; // #i105267# text datas may be cloned, remember all copies
BOOL bIsRTL;
BOOL bIsInsertMode;
BOOL bFormulaMode;
diff --git a/sc/source/ui/unoobj/docuno.cxx b/sc/source/ui/unoobj/docuno.cxx
index 6275edd..fe3a064 100644
--- a/sc/source/ui/unoobj/docuno.cxx
+++ b/sc/source/ui/unoobj/docuno.cxx
@@ -244,7 +244,8 @@ ScModelObj::~ScModelObj()
uno::Reference< uno::XAggregation> ScModelObj::GetFormatter()
{
- if ( !xNumberAgg.is() )
+ // pDocShell may be NULL if this is the base of a ScDocOptionsObj
+ if ( !xNumberAgg.is() && pDocShell )
{
// setDelegator veraendert den RefCount, darum eine Referenz selber halten
// (direkt am m_refCount, um sich beim release nicht selbst zu loeschen)
More information about the ooo-build-commit
mailing list