Hello,
By looking in the last fix commits, I sometimes "opengrok" to see if the
same kind of initial problem solved by the fix could be found.
Then I read this code :
71 // query the attribute descriptions
72 void SwAttrSet::GetPresentation(
73 SfxItemPresentation ePres,
74 SfxMapUnit eCoreMetric,
75 SfxMapUnit ePresMetric,
76 String &rText ) const
77 {
78 static sal_Char const sKomma[] = ", ";
79
80 rText.Erase();
81 String aStr;
82 if( Count() )
83 {
84 SfxItemIter aIter( *this );
85 const IntlWrapper rInt(
::comphelper::getProcessServiceFactory(),
86 GetAppLanguage() );
87 while( sal_True )
88 {
89 aIter.GetCurItem()->GetPresentation( ePres, eCoreMetric,
90 ePresMetric, aStr,
91 &rInt );
92 if( rText.Len() && aStr.Len() )
93 rText += String::CreateFromAscii(sKomma);
94 rText += aStr;
95 if( aIter.IsAtEnd() )
96 break;
97 aIter.NextItem();
98 }
99 }
100 }
if "rText" variable is completely cleared at the beginning (line 80), what's
the use of "rText.Len() &&..." (line 92) (and therefore line 93 and 78) ?
Julien
--
View this message in context:
http://nabble.documentfoundation.org/Question-about-function-SwAttrSet-GetPresentation-sw-source-ui-utlui-attrdesc-cxx-tp3991205.html
Sent from the Dev mailing list archive at Nabble.com.
Context
- Question about function SwAttrSet::GetPresentation (sw/source/ui/utlui/attrdesc.cxx) · julien2412
Privacy Policy |
Impressum (Legal Info) |
Copyright information: Unless otherwise specified, all text and images
on this website are licensed under the
Creative Commons Attribution-Share Alike 3.0 License.
This does not include the source code of LibreOffice, which is
licensed under the Mozilla Public License (
MPLv2).
"LibreOffice" and "The Document Foundation" are
registered trademarks of their corresponding registered owners or are
in actual use as trademarks in one or more countries. Their respective
logos and icons are also subject to international copyright laws. Use
thereof is explained in our
trademark policy.