From 7e1ddc5b7c07c3b9d2c5528954355362ce3391f1 Mon Sep 17 00:00:00 2001 From: Katarina Behrens Date: Mon, 24 Oct 2016 21:58:38 +0200 Subject: screenshot annotation: More readable markup this should placate clang too Change-Id: Ida2cceebd5870b5896fb125e51e4cb67ad253d92 --- cui/source/dialogs/screenshotannotationdlg.cxx | 47 +++++++++++++++----------- 1 file changed, 27 insertions(+), 20 deletions(-) diff --git a/cui/source/dialogs/screenshotannotationdlg.cxx b/cui/source/dialogs/screenshotannotationdlg.cxx index 53a0cc94e298..cd0591d26166 100644 --- a/cui/source/dialogs/screenshotannotationdlg.cxx +++ b/cui/source/dialogs/screenshotannotationdlg.cxx @@ -54,38 +54,45 @@ namespace OUString lcl_AltDescr() { - OUString aRet = OUString("") + - OUString(" ") + //FIXME real dialog title or something - OUString(""); - return aRet; + OUString aTempl = OUString("" + " " //FIXME real dialog title or something + ""); + aTempl = aTempl.replaceFirst( "%1", lcl_genRandom("alt_id") ); + + return aTempl; } OUString lcl_Image( const OUString& rScreenshotId ) { - OUString aRet = OUString("") + //FIXME width + height - lcl_AltDescr() + - OUString(""); - return aRet; + OUString aTempl = OUString("" //FIXME width + height + "%3" + ""); + aTempl = aTempl.replaceFirst( "%1", lcl_genRandom("img_id") ); + aTempl = aTempl.replaceFirst( "%2", rScreenshotId ); + aTempl = aTempl.replaceFirst( "%3", lcl_AltDescr() ); + + return aTempl; } OUString lcl_ParagraphWithImage( const OUString& rScreenshotId ) { - OUString aRet = OUString("") + - lcl_Image( rScreenshotId ) + - OUString(""); - return aRet; + OUString aTempl = OUString( "%2" + "" SAL_NEWLINE_STRING ); + aTempl = aTempl.replaceFirst( "%1", lcl_genRandom("par_id") ); + aTempl = aTempl.replaceFirst( "%2", lcl_Image(rScreenshotId) ); + + return aTempl; } OUString lcl_Bookmark( const OUString& rWidgetId ) { - OUString aRet = "" + SAL_NEWLINE_STRING; - aRet += OUString("") + SAL_NEWLINE_STRING; - return aRet; + OUString aTempl = "" SAL_NEWLINE_STRING + "" SAL_NEWLINE_STRING; + aTempl = aTempl.replaceFirst( "%1", rWidgetId ); + aTempl = aTempl.replaceFirst( "%2", rWidgetId ); + aTempl = aTempl.replaceFirst( "%3", lcl_genRandom("bm_id") ); + + return aTempl; } } -- cgit v1.2.3