diff options
author | Frank Schoenheit [fs] <frank.schoenheit@oracle.com> | 2011-01-07 13:50:28 +0100 |
---|---|---|
committer | Frank Schoenheit [fs] <frank.schoenheit@oracle.com> | 2011-01-07 13:50:28 +0100 |
commit | cbcec4a8a16a62438238b41470eba33ed5dfc780 (patch) | |
tree | 20e665e343ecabdb5ffe01545b348a5d1e9af350 /drawinglayer | |
parent | dba34c: #i110039# 'Form Design' now known as 'Database Form' (diff) | |
parent | dba34b: merged DEV300m96 (diff) | |
download | core-cbcec4a8a16a62438238b41470eba33ed5dfc780.tar.gz core-cbcec4a8a16a62438238b41470eba33ed5dfc780.zip |
dba34c: pulled/merged latest changes from CWS dba34b
Diffstat (limited to 'drawinglayer')
-rw-r--r-- | drawinglayer/source/primitive2d/metafileprimitive2d.cxx | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/drawinglayer/source/primitive2d/metafileprimitive2d.cxx b/drawinglayer/source/primitive2d/metafileprimitive2d.cxx index 0d57e566ef8a..893c572a3086 100644 --- a/drawinglayer/source/primitive2d/metafileprimitive2d.cxx +++ b/drawinglayer/source/primitive2d/metafileprimitive2d.cxx @@ -248,9 +248,12 @@ namespace if(nPushFlags) { OSL_ENSURE(maPropertyHolders.size(), "PropertyHolders: PUSH with no property holders (!)"); - PropertyHolder* pNew = new PropertyHolder(*maPropertyHolders.back()); - pNew->setPushFlags(nPushFlags); - maPropertyHolders.push_back(pNew); + if ( !maPropertyHolders.empty() ) + { + PropertyHolder* pNew = new PropertyHolder(*maPropertyHolders.back()); + pNew->setPushFlags(nPushFlags); + maPropertyHolders.push_back(pNew); + } } } @@ -354,8 +357,9 @@ namespace PropertyHolder& Current() { + static PropertyHolder aDummy; OSL_ENSURE(maPropertyHolders.size(), "PropertyHolders: CURRENT with no property holders (!)"); - return *maPropertyHolders.back(); + return maPropertyHolders.empty() ? aDummy : *maPropertyHolders.back(); } ~PropertyHolders() @@ -2013,7 +2017,7 @@ namespace if(nTextLength + nTextIndex > nStringLength) { - nTextLength = nStringLength - nTextIndex; + nTextLength = nTextIndex > nStringLength ? 0 : nStringLength - nTextIndex; } if(nTextLength && rPropertyHolders.Current().getTextColorActive()) |