Skip to content
Permalink
Browse files

Remove legacy code in composer label

git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@11351 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
mhugent
mhugent committed Aug 12, 2009
1 parent 68cd1a8 commit 3e388b50c67fb5243bb4e2a7cb20a6a1a4a92ce6
Showing with 0 additions and 23 deletions.
  1. +0 −23 src/core/composer/qgscomposerlabel.cpp
@@ -61,29 +61,6 @@ void QgsComposerLabel::paint( QPainter* painter, const QStyleOptionGraphicsItem*
void QgsComposerLabel::setText( const QString& text )
{
mText = text;

#if 0
//replace '$CURRENT_DATE<(FORMAT)>' with the current date
//e.g. $CURRENT_DATE(d 'June' yyyy)
mText = text;
int currentDatePos = mText.indexOf( "$CURRENT_DATE" );
if ( currentDatePos != -1 )
{
//check if there is a bracket just after $CURRENT_DATE
QString formatText;
int openingBracketPos = mText.indexOf( "(", currentDatePos );
int closingBracketPos = mText.indexOf( ")", openingBracketPos + 1 );
if ( openingBracketPos != -1 && closingBracketPos != -1 && ( closingBracketPos - openingBracketPos ) > 1 )
{
formatText = mText.mid( openingBracketPos + 1, closingBracketPos - openingBracketPos - 1 );
mText.replace( currentDatePos, closingBracketPos - currentDatePos + 1, QDate::currentDate().toString( formatText ) );
}
else //no bracket
{
mText.replace( "$CURRENT_DATE", QDate::currentDate().toString() );
}
}
#endif //0
}

QString QgsComposerLabel::displayText() const

0 comments on commit 3e388b5

Please sign in to comment.
You can’t perform that action at this time.