[Libreoffice-commits] core.git: 4 commits - sax/source svx/source sw/source
Michael Stahl
mstahl at redhat.com
Tue Dec 17 09:36:25 PST 2013
sax/source/tools/converter.cxx | 10 +++++++---
svx/source/accessibility/ChildrenManagerImpl.cxx | 2 +-
svx/source/unodraw/unoshtxt.cxx | 20 ++++++++++++++++++--
sw/source/core/access/accframe.cxx | 7 +++----
4 files changed, 29 insertions(+), 10 deletions(-)
New commits:
commit 64575a5b91b0fae6283b9ad8b1356e76caa34b45
Author: Michael Stahl <mstahl at redhat.com>
Date: Tue Dec 17 17:29:49 2013 +0100
sax: avoid usage of double for parsing nanoseconds here too
Change-Id: Iddf93a116cb333db6465a915dae692c33a60241a
diff --git a/sax/source/tools/converter.cxx b/sax/source/tools/converter.cxx
index 8b0b616..62e5b48 100644
--- a/sax/source/tools/converter.cxx
+++ b/sax/source/tools/converter.cxx
@@ -1645,9 +1645,13 @@ static bool lcl_parseDateTime(
}
if (bSuccess)
{
- const sal_Int32 nDigits = std::min<sal_Int32>(nPos - nStart, 9);
- OSL_ENSURE(nDigits > 0, "bad code monkey");
- nNanoSeconds=static_cast<double>(nTemp)*(1000000000.0/pow(10.0,nDigits));
+ sal_Int32 nDigits = std::min<sal_Int32>(nPos - nStart, 9);
+ assert(nDigits > 0);
+ for (; nDigits < 9; ++nDigits)
+ {
+ nTemp *= 10;
+ }
+ nNanoSeconds = nTemp;
}
}
commit 77378cde59bd9eb986f1ac8b071a5e853bc6805c
Author: Michael Stahl <mstahl at redhat.com>
Date: Mon Dec 16 21:59:25 2013 +0100
SvxTextEditSourceImpl::Notify(): attempt to fix chart2_unoapi crash
Apparently SvxTextEditSourceImpl::mpView is not properly invalidated
when the instance it points to is deleted; the SvxTextEditSourceImpl
is registered as listener so try to handle this in Notify(); not sure
if there isn't something that ought to have cleaned this up...
Crash running with SAL_FORCE_IACCESSIBLE2=1:
svxcorelo.dll!SdrPaintView::FindPaintWindow(const OutputDevice & rOut) Line 70
svxcorelo.dll!SvxTextEditSourceImpl::GetVisArea() Line 923
svxcorelo.dll!SvxTextEditSource::GetVisArea() Line 1113
svxlo.dll!accessibility::AccessibleTextHelper_Impl::UpdateVisibleChildren(bool bBroadcastEvents) Line 868
svxlo.dll!accessibility::AccessibleTextHelper_Impl::ProcessQueue() Line 1376
svxlo.dll!accessibility::AccessibleTextHelper_Impl::Notify(SfxBroadcaster & __formal, const SfxHint & rHint) Line 1530
svllo.dll!SfxBroadcaster::Broadcast(const SfxHint & rHint) Line 48
svxcorelo.dll!SvxTextEditSourceImpl::NotifyHdl(EENotify * aNotify) Line 1021
svxcorelo.dll!SvxTextEditSourceImpl::LinkStubNotifyHdl(void * pThis, void * pCaller) Line 1013
tllo.dll!Link::Call(void * pCaller) Line 123
editenglo.dll!Outliner::ImplBlockInsertionCallbacks(unsigned char b) Line 2098
editenglo.dll!Outliner::Clear() Line 2036
svxcorelo.dll!SdrOutlinerCache::disposeOutliner(SdrOutliner * pOutliner) Line 91
svxcorelo.dll!SdrModel::disposeOutliner(SdrOutliner * pOutliner) Line 1960
svxcorelo.dll!SvxTextEditSourceImpl::dispose() Line 489
svxcorelo.dll!SvxTextEditSourceImpl::Notify(SfxBroadcaster & __formal, const SfxHint & rHint) Line 458
svllo.dll!SfxBroadcaster::Broadcast(const SfxHint & rHint) Line 48
svxcorelo.dll!SdrModel::~SdrModel() Line 270
chartcorelo.dll!chart::DrawModelWrapper::~DrawModelWrapper() Line 191
chartcorelo.dll!chart::DrawModelWrapper::`vector deleting destructor'(unsigned int)
chartcorelo.dll!boost::checked_delete<chart::DrawModelWrapper>(chart::DrawModelWrapper * x) Line 34
chartcorelo.dll!boost::detail::sp_counted_impl_p<chart::DrawModelWrapper>::dispose() Line 78
chartcorelo.dll!boost::detail::sp_counted_base::release() Line 104
chartcorelo.dll!boost::detail::shared_count::~shared_count() Line 381
chartcorelo.dll!boost::shared_ptr<chart::DrawModelWrapper>::~shared_ptr<chart::DrawModelWrapper>()
chartcorelo.dll!boost::shared_ptr<chart::DrawModelWrapper>::reset() Line 626
chartcorelo.dll!chart::ChartView::~ChartView() Line 202
chartcorelo.dll!chart::ChartView::`scalar deleting destructor'(unsigned int)
cppuhelper3MSC.dll!cppu::OWeakObject::release() Line 204
chartcorelo.dll!cppu::WeakImplHelper10<com::sun::star::lang::XInitialization,com::sun::star::lang::XServiceInfo,com::sun::star::datatransfer::XTransferable,com::sun::star::lang::XUnoTunnel,com::sun::star::util::XModifyListener,com::sun::star::util::XModeChangeBroadcaster,com::sun::star::util::XUpdatable,com::sun::star::beans::XPropertySet,com::sun::star::lang::XMultiServiceFactory,com::sun::star::qa::XDumper>::release() Line 115
chartcorelo.dll!com::sun::star::uno::Reference<com::sun::star::uno::XInterface>::~Reference<com::sun::star::uno::XInterface>() Line 106
chartcorelo.dll!chart::ChartModel::~ChartModel() Line 188
chartcorelo.dll!chart::ChartModel::`vector deleting destructor'(unsigned int)
cppuhelper3MSC.dll!cppu::OWeakObject::release() Line 204
Change-Id: Ife6d6275eae74750858a7a7f57153c76a1a228a4
diff --git a/svx/source/unodraw/unoshtxt.cxx b/svx/source/unodraw/unoshtxt.cxx
index da2a481..30d364f 100644
--- a/svx/source/unodraw/unoshtxt.cxx
+++ b/svx/source/unodraw/unoshtxt.cxx
@@ -333,15 +333,31 @@ void SvxTextEditSourceImpl::ChangeModel( SdrModel* pNewModel )
//------------------------------------------------------------------------
-void SvxTextEditSourceImpl::Notify( SfxBroadcaster&, const SfxHint& rHint )
+void SvxTextEditSourceImpl::Notify(SfxBroadcaster& rBC, const SfxHint& rHint)
{
// #i105988 keep reference to this object
rtl::Reference< SvxTextEditSourceImpl > xThis( this );
const SdrHint* pSdrHint = PTR_CAST( SdrHint, &rHint );
const SvxViewHint* pViewHint = PTR_CAST( SvxViewHint, &rHint );
+ const SfxSimpleHint* pSimpleHint = PTR_CAST( SfxSimpleHint, &rHint );
- if( pViewHint )
+ if (pSimpleHint)
+ {
+ if (SFX_HINT_DYING == pSimpleHint->GetId())
+ {
+ if (&rBC == mpView)
+ {
+ mpView = 0;
+ if (mpViewForwarder)
+ {
+ delete mpViewForwarder;
+ mpViewForwarder = 0;
+ }
+ }
+ }
+ }
+ else if( pViewHint )
{
switch( pViewHint->GetHintType() )
{
commit ebb6c4407da2f8e913f1520b61a36ca3a4b54a7e
Author: Michael Stahl <mstahl at redhat.com>
Date: Tue Dec 17 11:19:21 2013 +0100
ChildrenManagerImpl::AddShape: do not use member after releasing mutex
This crashed here once during some JunitTest with an rDescriptor that
did not match maVisibleChildren.back().
[The mrContext member used here is const so shouldn't cause problems.]
Change-Id: I31e54b166badef6472127c64f0a4f49c51c73b30
diff --git a/svx/source/accessibility/ChildrenManagerImpl.cxx b/svx/source/accessibility/ChildrenManagerImpl.cxx
index 5fe9aef..71bafc8 100644
--- a/svx/source/accessibility/ChildrenManagerImpl.cxx
+++ b/svx/source/accessibility/ChildrenManagerImpl.cxx
@@ -490,7 +490,7 @@ void ChildrenManagerImpl::AddShape (const Reference<drawing::XShape>& rxShape)
AccessibleEventId::CHILD,
aNewShape,
uno::Any());
- RegisterAsDisposeListener (rDescriptor.mxShape);
+ RegisterAsDisposeListener(rxShape);
}
}
}
commit 133b18e677f3c132a64d5ddfce2aef943f397860
Author: Michael Stahl <mstahl at redhat.com>
Date: Mon Dec 16 18:51:18 2013 +0100
sw: revert PaintArea change in SwAccessibleFrame
76c549eb01dcb7b5bf28a271ce00e386f3d388ba changes some calls to
SwAccessibleChildSList to use the PaintArea() of the given SwFrm
instead of the given rVisArea, which makes
SwAccessibleFrame::GetChildCount() and GetChildIndex() inconsistent
with other methods such as GetChild(), GetChildAtPixel() etc.
Not sure which way is better, but it should be consistent;
revert the partial change for now and see.
Change-Id: I7d7edf2ec3dd0860ac2331d36757096186185e4f
diff --git a/sw/source/core/access/accframe.cxx b/sw/source/core/access/accframe.cxx
index fb1771f..34e7210 100644
--- a/sw/source/core/access/accframe.cxx
+++ b/sw/source/core/access/accframe.cxx
@@ -51,8 +51,7 @@ sal_Int32 SwAccessibleFrame::GetChildCount( SwAccessibleMap& rAccMap,
{
sal_Int32 nCount = 0;
- // const SwAccessibleChildSList aVisList( rVisArea, *pFrm, rAccMap );
- const SwAccessibleChildSList aVisList( pFrm->PaintArea(), *pFrm, rAccMap );
+ const SwAccessibleChildSList aVisList( rVisArea, *pFrm, rAccMap );
SwAccessibleChildSList::const_iterator aIter( aVisList.begin() );
while( aIter != aVisList.end() )
@@ -155,7 +154,7 @@ sal_Bool SwAccessibleFrame::GetChildIndex(
if( SwAccessibleChildMap::IsSortingRequired( rFrm ) )
{
// We need a sorted list here
- const SwAccessibleChildMap aVisMap( rFrm.PaintArea(), rFrm, rAccMap );
+ const SwAccessibleChildMap aVisMap( rVisArea, rFrm, rAccMap );
SwAccessibleChildMap::const_iterator aIter( aVisMap.begin() );
while( aIter != aVisMap.end() && !bFound )
{
@@ -182,7 +181,7 @@ sal_Bool SwAccessibleFrame::GetChildIndex(
// The unsorted list is sorted enough, because it returns lower
// frames in the correct order.
- const SwAccessibleChildSList aVisList( rFrm.PaintArea(), rFrm, rAccMap );
+ const SwAccessibleChildSList aVisList( rVisArea, rFrm, rAccMap );
SwAccessibleChildSList::const_iterator aIter( aVisList.begin() );
while( aIter != aVisList.end() && !bFound )
{
More information about the Libreoffice-commits
mailing list