Kaydet (Commit) 6a73e43b authored tarafından Caolán McNamara's avatar Caolán McNamara

MetaCommentAction now using rtl::OString

üst 67cf9cbe
...@@ -3107,7 +3107,7 @@ namespace ...@@ -3107,7 +3107,7 @@ namespace
// and makes the code less dependent from those Metafile Add-Ons // and makes the code less dependent from those Metafile Add-Ons
const MetaCommentAction* pA = (const MetaCommentAction*)pAction; const MetaCommentAction* pA = (const MetaCommentAction*)pAction;
if(COMPARE_EQUAL == pA->GetComment().CompareIgnoreCaseToAscii("XGRAD_SEQ_BEGIN")) if (pA->GetComment().equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("XGRAD_SEQ_BEGIN")))
{ {
// XGRAD_SEQ_BEGIN, XGRAD_SEQ_END should be supported since the // XGRAD_SEQ_BEGIN, XGRAD_SEQ_END should be supported since the
// pure recorded paint of the gradients uses the XOR paint functionality // pure recorded paint of the gradients uses the XOR paint functionality
...@@ -3127,7 +3127,7 @@ namespace ...@@ -3127,7 +3127,7 @@ namespace
} }
else if(META_COMMENT_ACTION == pAction->GetType()) else if(META_COMMENT_ACTION == pAction->GetType())
{ {
if(COMPARE_EQUAL == ((const MetaCommentAction*)pAction)->GetComment().CompareIgnoreCaseToAscii("XGRAD_SEQ_END")) if (((const MetaCommentAction*)pAction)->GetComment().equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("XGRAD_SEQ_END")))
{ {
bDone = true; bDone = true;
} }
......
...@@ -956,7 +956,7 @@ void ImpSdrGDIMetaFileImport::DoAction( MetaCommentAction& rAct, GDIMetaFile* pM ...@@ -956,7 +956,7 @@ void ImpSdrGDIMetaFileImport::DoAction( MetaCommentAction& rAct, GDIMetaFile* pM
{ {
ByteString aSkipComment; ByteString aSkipComment;
if( rAct.GetComment().CompareIgnoreCaseToAscii( "XGRAD_SEQ_BEGIN" ) == COMPARE_EQUAL ) if (rAct.GetComment().equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("XGRAD_SEQ_BEGIN")))
{ {
MetaGradientExAction* pAct = (MetaGradientExAction*) pMtf->NextAction(); MetaGradientExAction* pAct = (MetaGradientExAction*) pMtf->NextAction();
...@@ -1019,7 +1019,7 @@ void ImpSdrGDIMetaFileImport::DoAction( MetaCommentAction& rAct, GDIMetaFile* pM ...@@ -1019,7 +1019,7 @@ void ImpSdrGDIMetaFileImport::DoAction( MetaCommentAction& rAct, GDIMetaFile* pM
while( pSkipAct while( pSkipAct
&& ((pSkipAct->GetType() != META_COMMENT_ACTION ) && ((pSkipAct->GetType() != META_COMMENT_ACTION )
|| (((MetaCommentAction*)pSkipAct)->GetComment().CompareIgnoreCaseToAscii(aSkipComment.GetBuffer()) != COMPARE_EQUAL))) || !(((MetaCommentAction*)pSkipAct)->GetComment().equalsIgnoreAsciiCase(aSkipComment))))
{ {
pSkipAct = pMtf->NextAction(); pSkipAct = pMtf->NextAction();
} }
......
...@@ -72,13 +72,12 @@ using ::com::sun::star::lang::XMultiServiceFactory; ...@@ -72,13 +72,12 @@ using ::com::sun::star::lang::XMultiServiceFactory;
const MetaCommentAction* ImplCheckForEPS( GDIMetaFile& rMtf ) const MetaCommentAction* ImplCheckForEPS( GDIMetaFile& rMtf )
{ {
static ByteString aComment( (const sal_Char*)"EPSReplacementGraphic" );
const MetaCommentAction* pComment = NULL; const MetaCommentAction* pComment = NULL;
if ( ( rMtf.GetActionSize() >= 2 ) if ( ( rMtf.GetActionSize() >= 2 )
&& ( rMtf.FirstAction()->GetType() == META_EPS_ACTION ) && ( rMtf.FirstAction()->GetType() == META_EPS_ACTION )
&& ( ((const MetaAction*)rMtf.GetAction( 1 ))->GetType() == META_COMMENT_ACTION ) && ( ((const MetaAction*)rMtf.GetAction( 1 ))->GetType() == META_COMMENT_ACTION )
&& ( ((const MetaCommentAction*)rMtf.GetAction( 1 ))->GetComment() == aComment ) ) && ( ((const MetaCommentAction*)rMtf.GetAction( 1 ))->GetComment().equalsL(RTL_CONSTASCII_STRINGPARAM("EPSReplacementGraphic")) ) )
pComment = (const MetaCommentAction*)rMtf.GetAction( 1 ); pComment = (const MetaCommentAction*)rMtf.GetAction( 1 );
return pComment; return pComment;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment