[Libreoffice-commits] core.git: 13 commits - canvas/source dbaccess/source editeng/source reportdesign/source sc/source svx/source sw/source unoxml/source
David Tardon
dtardon at redhat.com
Mon Nov 3 10:21:22 PST 2014
canvas/source/cairo/cairo_canvashelper_text.cxx | 2
dbaccess/source/ui/control/RelationControl.cxx | 4
dbaccess/source/ui/control/TableGrantCtrl.cxx | 2
editeng/source/accessibility/AccessibleEditableTextPara.cxx | 14 +++
editeng/source/accessibility/AccessibleImageBullet.cxx | 14 +++
reportdesign/source/ui/dlg/GroupsSorting.cxx | 4
sc/source/ui/Accessibility/AccessibleDocument.cxx | 2
svx/source/accessibility/AccessibleTextHelper.cxx | 51 +++---------
sw/source/core/doc/DocumentLinksAdministrationManager.cxx | 34 ++++----
unoxml/source/dom/document.cxx | 1
10 files changed, 65 insertions(+), 63 deletions(-)
New commits:
commit 76718903d9df053239a7a4ef13e5c5b3046ef121
Author: David Tardon <dtardon at redhat.com>
Date: Mon Nov 3 17:56:03 2014 +0100
remove some extra empty lines
Change-Id: I88b95a253f19306c6519987a4a8f72e9362d4d9a
diff --git a/svx/source/accessibility/AccessibleTextHelper.cxx b/svx/source/accessibility/AccessibleTextHelper.cxx
index 6338f2d..f14db53 100644
--- a/svx/source/accessibility/AccessibleTextHelper.cxx
+++ b/svx/source/accessibility/AccessibleTextHelper.cxx
@@ -78,13 +78,8 @@ using namespace ::com::sun::star::accessibility;
namespace accessibility
{
-
-
// AccessibleTextHelper_Impl declaration
-
-
-
template < typename first_type, typename second_type >
::std::pair< first_type, second_type > makeSortedPair( first_type first,
second_type second )
@@ -97,7 +92,6 @@ namespace accessibility
class AccessibleTextHelper_Impl : public SfxListener
{
-
public:
typedef ::std::vector< sal_Int16 > VectorOfStates;
@@ -272,7 +266,6 @@ namespace accessibility
// normally should employ RAII here...
mnNotifierClientId(::comphelper::AccessibleEventNotifier::registerClient())
{
-
#ifdef DBG_UTIL
OSL_TRACE( "AccessibleTextHelper_Impl received ID: %d", mnNotifierClientId );
#endif
@@ -280,7 +273,6 @@ namespace accessibility
AccessibleTextHelper_Impl::~AccessibleTextHelper_Impl()
{
-
SolarMutexGuard aGuard;
try
@@ -294,7 +286,6 @@ namespace accessibility
SvxTextForwarder& AccessibleTextHelper_Impl::GetTextForwarder() const
{
-
if( !maEditSource.IsValid() )
throw uno::RuntimeException("Unknown edit source", mxFrontEnd);
@@ -311,7 +302,6 @@ namespace accessibility
SvxViewForwarder& AccessibleTextHelper_Impl::GetViewForwarder() const
{
-
if( !maEditSource.IsValid() )
throw uno::RuntimeException("Unknown edit source", mxFrontEnd);
@@ -328,7 +318,6 @@ namespace accessibility
SvxEditViewForwarder& AccessibleTextHelper_Impl::GetEditViewForwarder( bool bCreate ) const
{
-
if( !maEditSource.IsValid() )
throw uno::RuntimeException("Unknown edit source", mxFrontEnd);
@@ -355,7 +344,6 @@ namespace accessibility
SvxEditSourceAdapter& AccessibleTextHelper_Impl::GetEditSource() const
{
-
if( maEditSource.IsValid() )
return maEditSource;
else
@@ -364,7 +352,6 @@ namespace accessibility
bool AccessibleTextHelper_Impl::IsSelected() const
{
-
bool bRet = false;
try
@@ -393,7 +380,6 @@ namespace accessibility
void AccessibleTextHelper_Impl::SetStartIndex( sal_Int32 nOffset )
{
-
sal_Int32 nOldOffset( mnStartIndex );
mnStartIndex = nOffset;
@@ -415,7 +401,6 @@ namespace accessibility
void AccessibleTextHelper_Impl::SetChildFocus( sal_Int32 nChild, bool bHaveFocus )
{
-
if( bHaveFocus )
{
if( mbThisHasFocus )
@@ -441,7 +426,6 @@ namespace accessibility
void AccessibleTextHelper_Impl::ChangeChildFocus( sal_Int32 nNewChild )
{
-
if( mbThisHasFocus )
SetShapeFocus( false );
@@ -453,7 +437,6 @@ namespace accessibility
void AccessibleTextHelper_Impl::SetShapeFocus( bool bHaveFocus )
{
-
bool bOldFocus( mbThisHasFocus );
mbThisHasFocus = bHaveFocus;
@@ -499,7 +482,6 @@ namespace accessibility
void AccessibleTextHelper_Impl::SetFocus( bool bHaveFocus )
{
-
bool bOldFocus( mbGroupHasFocus );
mbGroupHasFocus = bHaveFocus;
@@ -523,10 +505,8 @@ namespace accessibility
OSL_TRACE("AccessibleTextHelper_Impl::SetFocus: focus changed, Object %p, state: %s", this, bHaveFocus ? "focused" : "not focused");
}
-
bool AccessibleTextHelper_Impl::IsActive() const
{
-
try
{
SvxEditSource& rEditSource = GetEditSource();
@@ -558,7 +538,6 @@ namespace accessibility
void AccessibleTextHelper_Impl::UpdateSelection()
{
-
try
{
ESelection aSelection;
@@ -742,7 +721,6 @@ namespace accessibility
void AccessibleTextHelper_Impl::ShutdownEditSource()
{
-
// This should only be called with solar mutex locked, i.e. from the main office thread
// This here is somewhat clumsy: As soon as our children have
@@ -768,7 +746,6 @@ namespace accessibility
void AccessibleTextHelper_Impl::SetEditSource( ::std::unique_ptr< SvxEditSource > && pEditSource )
{
-
// This should only be called with solar mutex locked, i.e. from the main office thread
// shutdown old edit source
@@ -791,7 +768,6 @@ namespace accessibility
void AccessibleTextHelper_Impl::SetOffset( const Point& rPoint )
{
-
// guard against non-atomic access to maOffset data structure
{
::osl::MutexGuard aGuard( maMutex );
@@ -807,7 +783,6 @@ namespace accessibility
void AccessibleTextHelper_Impl::UpdateVisibleChildren( bool bBroadcastEvents )
{
-
try
{
SvxTextForwarder& rCacheTF = GetTextForwarder();
@@ -918,7 +893,6 @@ namespace accessibility
void AccessibleTextHelper_Impl::UpdateBoundRect()
{
-
// send BOUNDRECT_CHANGED to affected children
AccessibleTextHelper_UpdateChildBounds aFunctor( *this );
::std::transform( maParaManager.begin(), maParaManager.end(), maParaManager.begin(), aFunctor );
@@ -955,7 +929,6 @@ namespace accessibility
void AccessibleTextHelper_Impl::ParagraphsMoved( sal_Int32 nFirst, sal_Int32 nMiddle, sal_Int32 nLast )
{
-
const sal_Int32 nParas = GetTextForwarder().GetParagraphCount();
/* rotate paragraphs
@@ -1112,7 +1085,6 @@ namespace accessibility
void AccessibleTextHelper_Impl::ProcessQueue()
{
-
// inspect queue for paragraph insert/remove events. If there
// is exactly _one_ of those in the queue, and the number of
// paragraphs has changed by exactly one, use that event to
@@ -1398,7 +1370,6 @@ namespace accessibility
void AccessibleTextHelper_Impl::Notify( SfxBroadcaster& /*rBC*/, const SfxHint& rHint )
{
-
// precondition: solar mutex locked
DBG_TESTSOLARMUTEX();
@@ -1527,7 +1498,6 @@ namespace accessibility
void AccessibleTextHelper_Impl::Dispose()
{
-
if( getNotifierClientId() != -1 )
{
try
@@ -1561,7 +1531,6 @@ namespace accessibility
void AccessibleTextHelper_Impl::FireEvent( const sal_Int16 nEventId, const uno::Any& rNewValue, const uno::Any& rOldValue ) const
{
-
// -- object locked --
::osl::ClearableMutexGuard aGuard( maMutex );
@@ -1586,7 +1555,6 @@ namespace accessibility
void AccessibleTextHelper_Impl::FireEvent( const AccessibleEventObject& rEvent ) const
{
-
// #102261# Call global queue for focus events
if( rEvent.EventId == AccessibleStateType::FOCUSED )
vcl::unohelper::NotifyAccessibleStateEventGlobally( rEvent );
@@ -1599,13 +1567,11 @@ namespace accessibility
// XAccessibleContext
sal_Int32 SAL_CALL AccessibleTextHelper_Impl::getAccessibleChildCount()
{
-
return mnLastVisibleChild - mnFirstVisibleChild + 1;
}
uno::Reference< XAccessible > SAL_CALL AccessibleTextHelper_Impl::getAccessibleChild( sal_Int32 i )
{
-
i -= GetStartIndex();
if( 0 > i || i >= getAccessibleChildCount() ||
@@ -1624,14 +1590,12 @@ namespace accessibility
void SAL_CALL AccessibleTextHelper_Impl::addAccessibleEventListener( const uno::Reference< XAccessibleEventListener >& xListener )
{
-
if( getNotifierClientId() != -1 )
::comphelper::AccessibleEventNotifier::addEventListener( getNotifierClientId(), xListener );
}
void SAL_CALL AccessibleTextHelper_Impl::removeAccessibleEventListener( const uno::Reference< XAccessibleEventListener >& xListener )
{
-
if( getNotifierClientId() != -1 )
{
const sal_Int32 nListenerCount = ::comphelper::AccessibleEventNotifier::removeEventListener( getNotifierClientId(), xListener );
@@ -1650,7 +1614,6 @@ namespace accessibility
uno::Reference< XAccessible > SAL_CALL AccessibleTextHelper_Impl::getAccessibleAtPoint( const awt::Point& _aPoint )
{
-
// make given position relative
if( !mxFrontEnd.is() )
throw uno::RuntimeException("AccessibleTextHelper_Impl::getAccessibleAt: frontend invalid", mxFrontEnd );
commit bce4f8dd83143c74c52d2fbb4527ba8a1ff71ed3
Author: David Tardon <dtardon at redhat.com>
Date: Mon Nov 3 17:52:23 2014 +0100
coverity#982188 unchecked return value
Change-Id: I8b99afa5d43e1a9f003c3b31175d73bf5a289232
diff --git a/svx/source/accessibility/AccessibleTextHelper.cxx b/svx/source/accessibility/AccessibleTextHelper.cxx
index 751cb0d..6338f2d 100644
--- a/svx/source/accessibility/AccessibleTextHelper.cxx
+++ b/svx/source/accessibility/AccessibleTextHelper.cxx
@@ -1633,7 +1633,19 @@ namespace accessibility
{
if( getNotifierClientId() != -1 )
- ::comphelper::AccessibleEventNotifier::removeEventListener( getNotifierClientId(), xListener );
+ {
+ const sal_Int32 nListenerCount = ::comphelper::AccessibleEventNotifier::removeEventListener( getNotifierClientId(), xListener );
+ if ( !nListenerCount )
+ {
+ // no listeners anymore
+ // -> revoke ourself. This may lead to the notifier thread dying (if we were the last client),
+ // and at least to us not firing any events anymore, in case somebody calls
+ // NotifyAccessibleEvent, again
+ ::comphelper::AccessibleEventNotifier::TClientId nId( getNotifierClientId() );
+ mnNotifierClientId = -1;
+ ::comphelper::AccessibleEventNotifier::revokeClient( nId );
+ }
+ }
}
uno::Reference< XAccessible > SAL_CALL AccessibleTextHelper_Impl::getAccessibleAtPoint( const awt::Point& _aPoint )
commit 6631ed540b701d4f8e04b34f528c6531980b1823
Author: David Tardon <dtardon at redhat.com>
Date: Mon Nov 3 17:50:51 2014 +0100
coverity#982161 unchecked return value
Change-Id: I3c8370915898e322f40812b52929132e192b3a2c
diff --git a/editeng/source/accessibility/AccessibleImageBullet.cxx b/editeng/source/accessibility/AccessibleImageBullet.cxx
index 155da12..7fa0924 100644
--- a/editeng/source/accessibility/AccessibleImageBullet.cxx
+++ b/editeng/source/accessibility/AccessibleImageBullet.cxx
@@ -207,7 +207,19 @@ namespace accessibility
{
if( getNotifierClientId() != -1 )
- ::comphelper::AccessibleEventNotifier::removeEventListener( getNotifierClientId(), xListener );
+ {
+ const sal_Int32 nListenerCount = ::comphelper::AccessibleEventNotifier::removeEventListener( getNotifierClientId(), xListener );
+ if ( !nListenerCount )
+ {
+ // no listeners anymore
+ // -> revoke ourself. This may lead to the notifier thread dying (if we were the last client),
+ // and at least to us not firing any events anymore, in case somebody calls
+ // NotifyAccessibleEvent, again
+ ::comphelper::AccessibleEventNotifier::TClientId nId( getNotifierClientId() );
+ mnNotifierClientId = -1;
+ ::comphelper::AccessibleEventNotifier::revokeClient( nId );
+ }
+ }
}
sal_Bool SAL_CALL AccessibleImageBullet::containsPoint( const awt::Point& rPoint ) throw (uno::RuntimeException, std::exception)
commit f141ef6bcf76945edbd7353344271e95057d5d3b
Author: David Tardon <dtardon at redhat.com>
Date: Mon Nov 3 17:49:06 2014 +0100
coverity#982160 unchecked return value
Change-Id: I94117e9f53f1929906b88b2a31d0fcfdf2e40c8d
diff --git a/editeng/source/accessibility/AccessibleEditableTextPara.cxx b/editeng/source/accessibility/AccessibleEditableTextPara.cxx
index 5a37e12..3c2cdb1 100644
--- a/editeng/source/accessibility/AccessibleEditableTextPara.cxx
+++ b/editeng/source/accessibility/AccessibleEditableTextPara.cxx
@@ -1025,7 +1025,19 @@ namespace accessibility
void SAL_CALL AccessibleEditableTextPara::removeAccessibleEventListener( const uno::Reference< XAccessibleEventListener >& xListener ) throw (uno::RuntimeException, std::exception)
{
if( getNotifierClientId() != -1 )
- ::comphelper::AccessibleEventNotifier::removeEventListener( getNotifierClientId(), xListener );
+ {
+ const sal_Int32 nListenerCount = ::comphelper::AccessibleEventNotifier::removeEventListener( getNotifierClientId(), xListener );
+ if ( !nListenerCount )
+ {
+ // no listeners anymore
+ // -> revoke ourself. This may lead to the notifier thread dying (if we were the last client),
+ // and at least to us not firing any events anymore, in case somebody calls
+ // NotifyAccessibleEvent, again
+ ::comphelper::AccessibleEventNotifier::TClientId nId( getNotifierClientId() );
+ mnNotifierClientId = -1;
+ ::comphelper::AccessibleEventNotifier::revokeClient( nId );
+ }
+ }
}
// XAccessibleComponent
commit c982e6f50e7ad28b944e617c4be4d2b24d5bd682
Author: David Tardon <dtardon at redhat.com>
Date: Mon Nov 3 17:35:08 2014 +0100
coverity#982488 unchecked dynamic_cast
Change-Id: I7008b3a96400a4d1520a03d985c0b421ff587bcb
diff --git a/unoxml/source/dom/document.cxx b/unoxml/source/dom/document.cxx
index 40b3ce7..d7af99d 100644
--- a/unoxml/source/dom/document.cxx
+++ b/unoxml/source/dom/document.cxx
@@ -441,6 +441,7 @@ namespace DOM
::rtl::Reference< CAttr > const pCAttr(
dynamic_cast< CAttr* >(GetCNode(
reinterpret_cast<xmlNodePtr>(pAttr)).get()));
+ if (!pCAttr.is()) { throw RuntimeException(); }
pCAttr->m_bUnlinked = true;
return pCAttr.get();
};
commit 358b2f45c34a63a5513ddb05af9f5cff1f39612e
Author: David Tardon <dtardon at redhat.com>
Date: Mon Nov 3 16:41:33 2014 +0100
coverity#1209103 copy-paste error
Change-Id: I9ed3ef809401ecf23e9c1f9bd020cf96049b56f0
diff --git a/sc/source/ui/Accessibility/AccessibleDocument.cxx b/sc/source/ui/Accessibility/AccessibleDocument.cxx
index 751a9fe..ea2688e 100644
--- a/sc/source/ui/Accessibility/AccessibleDocument.cxx
+++ b/sc/source/ui/Accessibility/AccessibleDocument.cxx
@@ -991,7 +991,7 @@ bool ScChildrenShapes::FindSelectedShapesChanges(const uno::Reference<drawing::X
if ((*aDataItr)->pAccShape)
{
(*aDataItr)->pAccShape->SetState(AccessibleStateType::SELECTED);
- (*aDataItr)->pAccShape->ResetState(AccessibleStateType::FOCUSED);
+ (*aDataItr)->pAccShape->SetState(AccessibleStateType::FOCUSED);
bResult = true;
vecSelectedShapeAdd.push_back((*aDataItr));
}
commit de0a3e8d5ad56e1cff049b4d6edb71ae15b7b9a5
Author: David Tardon <dtardon at redhat.com>
Date: Mon Nov 3 16:34:47 2014 +0100
coverity#1240253 unchecked return value
Change-Id: I0262cb51fbc0b8e4bb6d6aabbd59a7c271768a99
diff --git a/sw/source/core/doc/DocumentLinksAdministrationManager.cxx b/sw/source/core/doc/DocumentLinksAdministrationManager.cxx
index ebb8c04..0d2633c 100644
--- a/sw/source/core/doc/DocumentLinksAdministrationManager.cxx
+++ b/sw/source/core/doc/DocumentLinksAdministrationManager.cxx
@@ -498,22 +498,24 @@ bool DocumentLinksAdministrationManager::SelectServerObj( const OUString& rStr,
const SwOutlineNodes& rOutlNds = m_rDoc.GetNodes().GetOutLineNds();
sal_uInt16 nTmpPos;
- rOutlNds.Seek_Entry( pNd, &nTmpPos );
- rpRange = new SwNodeRange( aPos.nNode, 0, aPos.nNode );
-
- // look for the section's end, now
- for( ++nTmpPos;
- nTmpPos < rOutlNds.size() &&
- nLvl < rOutlNds[ nTmpPos ]->GetTxtNode()->
- GetAttrOutlineLevel()-1;
- ++nTmpPos )
- ; // there is no block
-
- if( nTmpPos < rOutlNds.size() )
- rpRange->aEnd = *rOutlNds[ nTmpPos ];
- else
- rpRange->aEnd = m_rDoc.GetNodes().GetEndOfContent();
- return true;
+ if ( rOutlNds.Seek_Entry( pNd, &nTmpPos ) )
+ {
+ rpRange = new SwNodeRange( aPos.nNode, 0, aPos.nNode );
+
+ // look for the section's end, now
+ for( ++nTmpPos;
+ nTmpPos < rOutlNds.size() &&
+ nLvl < rOutlNds[ nTmpPos ]->GetTxtNode()->
+ GetAttrOutlineLevel()-1;
+ ++nTmpPos )
+ ; // there is no block
+
+ if( nTmpPos < rOutlNds.size() )
+ rpRange->aEnd = *rOutlNds[ nTmpPos ];
+ else
+ rpRange->aEnd = m_rDoc.GetNodes().GetEndOfContent();
+ return true;
+ }
}
}
commit b82055f9d8a39bcf76b83e97451ae51829bcb219
Author: David Tardon <dtardon at redhat.com>
Date: Mon Nov 3 16:19:37 2014 +0100
I think this should be Left()
Change-Id: I603215180e86ca28b94b129378ec48b7658e37b5
diff --git a/dbaccess/source/ui/control/TableGrantCtrl.cxx b/dbaccess/source/ui/control/TableGrantCtrl.cxx
index 7a2582e..ced37d6 100644
--- a/dbaccess/source/ui/control/TableGrantCtrl.cxx
+++ b/dbaccess/source/ui/control/TableGrantCtrl.cxx
@@ -405,7 +405,7 @@ void OTableGrantControl::PaintCell( OutputDevice& rDev, const Rectangle& rRect,
sal_Int32 nWidth = GetDataWindow().GetTextWidth( aText );
sal_Int32 nHeight = GetDataWindow().GetTextHeight();
- if( aPos.X() < rRect.Right() || aPos.X() + nWidth > rRect.Right() ||
+ if( aPos.X() < rRect.Left() || aPos.X() + nWidth > rRect.Right() ||
aPos.Y() < rRect.Top() || aPos.Y() + nHeight > rRect.Bottom() )
{
rDev.SetClipRegion(vcl::Region(rRect));
commit 0148c43aeaa73951af09fdefe173e408aa7dc0c5
Author: David Tardon <dtardon at redhat.com>
Date: Mon Nov 3 16:17:03 2014 +0100
I think this should be Left()
Change-Id: I8588809ce636107b4e9a51c5a1f4bc7af3f23f0d
diff --git a/reportdesign/source/ui/dlg/GroupsSorting.cxx b/reportdesign/source/ui/dlg/GroupsSorting.cxx
index fe4096f..dfe9228 100644
--- a/reportdesign/source/ui/dlg/GroupsSorting.cxx
+++ b/reportdesign/source/ui/dlg/GroupsSorting.cxx
@@ -553,7 +553,7 @@ void OFieldExpressionControl::PaintCell( OutputDevice& rDev, const Rectangle& rR
Point aPos( rRect.TopLeft() );
Size aTextSize( GetDataWindow().GetTextWidth( aText ), GetDataWindow().GetTextHeight() );
- if( aPos.X() < rRect.Right() || aPos.X() + aTextSize.Width() > rRect.Right() ||
+ if( aPos.X() < rRect.Left() || aPos.X() + aTextSize.Width() > rRect.Right() ||
aPos.Y() < rRect.Top() || aPos.Y() + aTextSize.Height() > rRect.Bottom() )
rDev.SetClipRegion(vcl::Region(rRect));
commit 598e51637d05d44260bda07469e885f5570e129f
Author: David Tardon <dtardon at redhat.com>
Date: Mon Nov 3 16:16:48 2014 +0100
coverity#1242514 arguments in wrong order
Change-Id: Icc6d4f0375106b670dd1efd04395f3c163bdd65d
diff --git a/reportdesign/source/ui/dlg/GroupsSorting.cxx b/reportdesign/source/ui/dlg/GroupsSorting.cxx
index aa86925..fe4096f 100644
--- a/reportdesign/source/ui/dlg/GroupsSorting.cxx
+++ b/reportdesign/source/ui/dlg/GroupsSorting.cxx
@@ -551,7 +551,7 @@ void OFieldExpressionControl::PaintCell( OutputDevice& rDev, const Rectangle& rR
OUString aText =const_cast< OFieldExpressionControl*>(this)->GetCellText( m_nCurrentPos, nColumnId );
Point aPos( rRect.TopLeft() );
- Size aTextSize( GetDataWindow().GetTextHeight(),GetDataWindow().GetTextWidth( aText ));
+ Size aTextSize( GetDataWindow().GetTextWidth( aText ), GetDataWindow().GetTextHeight() );
if( aPos.X() < rRect.Right() || aPos.X() + aTextSize.Width() > rRect.Right() ||
aPos.Y() < rRect.Top() || aPos.Y() + aTextSize.Height() > rRect.Bottom() )
commit 3e6f70a39cb227f67c8d7b399cf0290418a2dd08
Author: David Tardon <dtardon at redhat.com>
Date: Mon Nov 3 16:14:22 2014 +0100
I think this should be Left()
Change-Id: Ifd83a4a28414ffa5d8cc3cec3def4361737a333e
diff --git a/dbaccess/source/ui/control/RelationControl.cxx b/dbaccess/source/ui/control/RelationControl.cxx
index f9754e4..6fd60f5 100644
--- a/dbaccess/source/ui/control/RelationControl.cxx
+++ b/dbaccess/source/ui/control/RelationControl.cxx
@@ -350,7 +350,7 @@ namespace dbaui
Point aPos( rRect.TopLeft() );
Size aTextSize( GetDataWindow().GetTextWidth( aText ), GetDataWindow().GetTextHeight() );
- if( aPos.X() < rRect.Right() || aPos.X() + aTextSize.Width() > rRect.Right() ||
+ if( aPos.X() < rRect.Left() || aPos.X() + aTextSize.Width() > rRect.Right() ||
aPos.Y() < rRect.Top() || aPos.Y() + aTextSize.Height() > rRect.Bottom() )
{
rDev.SetClipRegion(vcl::Region(rRect));
commit 074cbe02eef9c4cd34cc87d496fb1d1e6c349383
Author: David Tardon <dtardon at redhat.com>
Date: Mon Nov 3 16:13:41 2014 +0100
coverity#1242510 arguments in wrong order
Change-Id: I898f3e383f5ff3451860e49b0ea00111ed1b52c2
diff --git a/dbaccess/source/ui/control/RelationControl.cxx b/dbaccess/source/ui/control/RelationControl.cxx
index 5d60e63..f9754e4 100644
--- a/dbaccess/source/ui/control/RelationControl.cxx
+++ b/dbaccess/source/ui/control/RelationControl.cxx
@@ -348,7 +348,7 @@ namespace dbaui
OUString aText = const_cast< ORelationControl*>(this)->GetCellText( m_nDataPos, nColumnId );
Point aPos( rRect.TopLeft() );
- Size aTextSize( GetDataWindow().GetTextHeight(),GetDataWindow().GetTextWidth( aText ));
+ Size aTextSize( GetDataWindow().GetTextWidth( aText ), GetDataWindow().GetTextHeight() );
if( aPos.X() < rRect.Right() || aPos.X() + aTextSize.Width() > rRect.Right() ||
aPos.Y() < rRect.Top() || aPos.Y() + aTextSize.Height() > rRect.Bottom() )
commit dbf093aa59db9b8ccb312f7a5cd2a997f704dc90
Author: David Tardon <dtardon at redhat.com>
Date: Mon Nov 3 15:54:08 2014 +0100
coverity#982921 do not leak
Change-Id: I7f40b7e72caa67644b23f02fa6c2a4ccfe4f354d
diff --git a/canvas/source/cairo/cairo_canvashelper_text.cxx b/canvas/source/cairo/cairo_canvashelper_text.cxx
index e411752..c9c3702 100644
--- a/canvas/source/cairo/cairo_canvashelper_text.cxx
+++ b/canvas/source/cairo/cairo_canvashelper_text.cxx
@@ -332,7 +332,7 @@ namespace cairocanvas
OSL_TRACE(":cairocanvas::CanvasHelper::drawText(O,t,f,v,r,d): %s", OUStringToOString( text.Text.copy( text.StartPosition, text.Length ),
RTL_TEXTENCODING_UTF8 ).getStr());
- TextLayout* pTextLayout = new TextLayout(text, textDirection, 0, CanvasFont::Reference(dynamic_cast< CanvasFont* >( xFont.get() )), mpSurfaceProvider);
+ rtl::Reference< TextLayout > pTextLayout( new TextLayout(text, textDirection, 0, CanvasFont::Reference(dynamic_cast< CanvasFont* >( xFont.get() )), mpSurfaceProvider) );
pTextLayout->draw( mpSurface, *mpVirtualDevice, aOutpos, viewState, renderState );
}
More information about the Libreoffice-commits
mailing list