summaryrefslogtreecommitdiff
path: root/editeng/source/rtf/rtfgrf.cxx
diff options
context:
space:
mode:
authorAndre Fischer <andre.f.fischer <Andre Fischer<andre.f.fischer@oracle.com>2011-01-26 11:11:11 +0100
committerAndre Fischer <andre.f.fischer <Andre Fischer<andre.f.fischer@oracle.com>2011-01-26 11:11:11 +0100
commitcf054f6ef9d88233703678889bc3eb3efe516ec3 (patch)
tree1d2e2e6166cab18b3cec15dafa144557c63c5a8d /editeng/source/rtf/rtfgrf.cxx
parent312cafc472e4ac74a045baf123476a2457c15185 (diff)
parentd646413d464dc5d6518f87daa8538cd0c600797f (diff)
impress195: rebase to DEV300 m98
Diffstat (limited to 'editeng/source/rtf/rtfgrf.cxx')
-rw-r--r--editeng/source/rtf/rtfgrf.cxx36
1 files changed, 33 insertions, 3 deletions
diff --git a/editeng/source/rtf/rtfgrf.cxx b/editeng/source/rtf/rtfgrf.cxx
index 24fd4465b031..4b0051cd3c81 100644
--- a/editeng/source/rtf/rtfgrf.cxx
+++ b/editeng/source/rtf/rtfgrf.cxx
@@ -39,6 +39,7 @@
#include <editeng/svxrtf.hxx>
+using namespace ::rtl;
#ifndef DBG_UTIL
#undef DEBUG_JP
@@ -316,14 +317,26 @@ BOOL SvxRTFParser::ReadBmpData( Graphic& rGrf, SvxRTFPictureType& rPicType )
if( RTF_SHPPICT == GetStackPtr(0)->nTokenId )
++nValidDataBraket;
-
+ OUString sShapePropertyName, sShapePropertyValue;
+ int nShapePropertyBracket = -1;
while( _nOpenBrakets && IsParserWorking() && bValidBmp )
{
nToken = GetNextToken();
USHORT nVal = USHORT( nTokenValue );
switch( nToken )
{
- case '}': --_nOpenBrakets; break;
+ case '}':
+ --_nOpenBrakets;
+ if( nShapePropertyBracket > 0 && nShapePropertyBracket > _nOpenBrakets )
+ {
+ nShapePropertyBracket = -1;
+ if( sShapePropertyName.getLength() )
+ {
+ rPicType.aPropertyPairs.push_back( ::std::pair< OUString, OUString >( sShapePropertyName, sShapePropertyValue ) );
+ sShapePropertyName = sShapePropertyValue = ::rtl::OUString();
+ }
+ }
+ break;
case '{':
{
if( RTF_IGNOREFLAG != GetNextToken() )
@@ -439,7 +452,24 @@ BOOL SvxRTFParser::ReadBmpData( Graphic& rGrf, SvxRTFPictureType& rPicType )
case RTF_PICCROPB: rPicType.nCropB = (short)nTokenValue; break;
case RTF_PICCROPL: rPicType.nCropL = (short)nTokenValue; break;
case RTF_PICCROPR: rPicType.nCropR = (short)nTokenValue; break;
-
+ case RTF_SP:
+ //read pairs of {\sn Name}{\sv Value}
+ nShapePropertyBracket = _nOpenBrakets;
+ break;
+ case RTF_SN:
+ nToken = GetNextToken();
+ if( nToken != '}' )
+ sShapePropertyName = aToken;
+ else
+ nToken = SkipToken( -1 );
+ break;
+ case RTF_SV:
+ nToken = GetNextToken();
+ if( nToken != '}' )
+ sShapePropertyValue = aToken;
+ else
+ nToken = SkipToken( -1 );
+ break;
case RTF_TEXTTOKEN:
// JP 26.06.98: Bug #51719# - nur TextToken auf 1. Ebene
// auswerten. Alle anderen sind irgendwelche