summaryrefslogtreecommitdiff
path: root/canvas
diff options
context:
space:
mode:
authorCaolán McNamara <cmc@openoffice.org>2010-08-03 10:25:58 +0100
committerCaolán McNamara <cmc@openoffice.org>2010-08-03 10:25:58 +0100
commit3833427a35230616627fe633d34edcd314581e6a (patch)
tree530222e2d51a940322dc4bab65444e555bfe667b /canvas
parent6b16723121bffd8ebf9b8e688af5457235f687ef (diff)
parentdeee1f03fb16af83c642121a5682af3398d90ece (diff)
cmcfixes77: merge with DEV300 m86
Diffstat (limited to 'canvas')
-rw-r--r--canvas/source/tools/pagemanager.cxx42
-rwxr-xr-xcanvas/source/vcl/canvashelper_texturefill.cxx2
2 files changed, 25 insertions, 19 deletions
diff --git a/canvas/source/tools/pagemanager.cxx b/canvas/source/tools/pagemanager.cxx
index b867b432857c..b2a71bf86cd3 100644
--- a/canvas/source/tools/pagemanager.cxx
+++ b/canvas/source/tools/pagemanager.cxx
@@ -70,7 +70,8 @@ namespace canvas
{
maPages.push_back(pPage);
FragmentSharedPtr pFragment(pPage->allocateSpace(rSize));
- maFragments.push_back(pFragment);
+ if (pFragment)
+ maFragments.push_back(pFragment);
return pFragment;
}
@@ -124,34 +125,39 @@ namespace canvas
FragmentContainer_t::const_iterator candidate(maFragments.begin());
while(candidate != aEnd)
{
- if(!((*candidate)->isNaked()))
+ if(*candidate && !((*candidate)->isNaked()))
break;
++candidate;
}
- const ::basegfx::B2ISize& rSize((*candidate)->getSize());
- sal_uInt32 nMaxArea(rSize.getX()*rSize.getY());
-
- FragmentContainer_t::const_iterator it(candidate);
- while(it != aEnd)
+ if (candidate != aEnd)
{
- if(!((*it)->isNaked()))
+ const ::basegfx::B2ISize& rSize((*candidate)->getSize());
+ sal_uInt32 nMaxArea(rSize.getX()*rSize.getY());
+
+ FragmentContainer_t::const_iterator it(candidate);
+ while(it != aEnd)
{
- const ::basegfx::B2ISize& rCandidateSize((*it)->getSize());
- const sal_uInt32 nArea(rCandidateSize.getX()*rCandidateSize.getY());
- if(nArea > nMaxArea)
+ if (*it && !((*it)->isNaked()))
{
- candidate=it;
- nMaxArea=nArea;
+ const ::basegfx::B2ISize& rCandidateSize((*it)->getSize());
+ const sal_uInt32 nArea(rCandidateSize.getX()*rCandidateSize.getY());
+ if(nArea > nMaxArea)
+ {
+ candidate=it;
+ nMaxArea=nArea;
+ }
}
+
+ ++it;
}
- ++it;
+ // this does not erase the candidate,
+ // but makes it 'naked'...
+ (*candidate)->free(*candidate);
}
-
- // this does not erase the candidate,
- // but makes it 'naked'...
- (*candidate)->free(*candidate);
+ else
+ break;
}
}
diff --git a/canvas/source/vcl/canvashelper_texturefill.cxx b/canvas/source/vcl/canvashelper_texturefill.cxx
index 023ceb2b5005..637b3af3315e 100755
--- a/canvas/source/vcl/canvashelper_texturefill.cxx
+++ b/canvas/source/vcl/canvashelper_texturefill.cxx
@@ -700,7 +700,7 @@ namespace vclcanvas
}
#endif // complex-clipping vs. XOR-trick
-#if defined(VERBOSE) && OSL_DEBUG_LEVEL > 0
+#if 0 //defined(VERBOSE) && OSL_DEBUG_LEVEL > 0
{
::basegfx::B2DRectangle aRect(0.0, 0.0, 1.0, 1.0);
::basegfx::B2DRectangle aTextureDeviceRect;