[Libreoffice-commits] .: Branch 'libreoffice-3-5' - sw/source
Cédric Bosdonnat
cbosdo at kemper.freedesktop.org
Wed Dec 14 02:24:14 PST 2011
sw/source/core/layout/trvlfrm.cxx | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
New commits:
commit c5f868147909111ad235e433d6f8368294080b35
Author: Cédric Bosdonnat <cedric.bosdonnat at free.fr>
Date: Tue Dec 13 17:25:51 2011 +0100
n#676858: Fix selection of background pictures vs text
diff --git a/sw/source/core/layout/trvlfrm.cxx b/sw/source/core/layout/trvlfrm.cxx
index 4b54a68..d2c3d4e 100644
--- a/sw/source/core/layout/trvlfrm.cxx
+++ b/sw/source/core/layout/trvlfrm.cxx
@@ -31,6 +31,7 @@
#include <hintids.hxx>
#include <hints.hxx>
#include <tools/bigint.hxx>
+#include <editeng/opaqitem.hxx>
#include <editeng/protitem.hxx>
#include <vcl/settings.hxx>
#include <vcl/outdev.hxx>
@@ -78,7 +79,8 @@ namespace {
static_cast<const SwVirtFlyDrawObj*>(aIter());
const SwAnchoredObject* pAnchoredObj = GetUserCall( aIter() )->GetAnchoredObj( aIter() );
const SwFmtSurround& rSurround = pAnchoredObj->GetFrmFmt().GetSurround();
- bool bInBackground = ( rSurround.GetSurround() == SURROUND_THROUGHT );
+ const SvxOpaqueItem& rOpaque = pAnchoredObj->GetFrmFmt().GetOpaque();
+ bool bInBackground = ( rSurround.GetSurround() == SURROUND_THROUGHT ) && !rOpaque.GetValue();
bool bBackgroundMatches = ( bInBackground && bSearchBackground ) ||
( !bInBackground && !bSearchBackground );
@@ -274,7 +276,7 @@ sal_Bool SwPageFrm::GetCrsrOfst( SwPosition *pPos, Point &rPoint,
}
// TODO Pick up the best approaching selection
- if ( bTextRet && bBackRet && ( nTextSurface < nBackSurface ) )
+ if ( bTextRet && bBackRet && ( nTextSurface > nBackSurface ) )
{
bRet = bBackRet;
pPos->nNode = aBackPos.nNode;
More information about the Libreoffice-commits
mailing list