[Libreoffice] Moving duplicate code into methods
ChrRossmanith at gmx.de
Tue May 3 11:35:43 PDT 2011
>> +sal_Int32 GetNumberOfProperties ( const SvxMSDffHandle* pData )
>> +void SetProperties (const SvxMSDffHandle* pData, com::sun::star::beans::PropertyValues& rPropValues)
> looks ok to me - or maybe ShapePropertiesFromDFF or somesuch, as
> set/getProps sounds somehow generic (and is quite heavily overloaded
> as a name).
> Additionally, please make those methods static (they're only used
> inside that file) - and another loosely followed convention is to
> prefix those local methods with either "lcl_" or "Impl"/"impl".
So we have:
static sal_Int32 <prefix>GetNumberOfProperties ( const SvxMSDffHandle*
static void <prefix>ShapePropertiesFromDFF (const SvxMSDffHandle* pData,
with <prefix> = "lcl_" or "[Ii]mpl" - is one of these prefices more
modern than the others? What about indentation and formatting of
if/then/else or switch statements? Any rules?
> Though that's a matter of taste ... ;)
That's why I've asked for review :-)
More information about the LibreOffice