def get_image_margins(style): ans = {} for edge in 'Left Right Top Bottom'.split(): val = as_num(getattr(style, 'padding' + edge)) + as_num( getattr(style, 'margin' + edge)) ans['dist' + edge[0]] = str(pt_to_emu(val)) return ans
def get_image_margins(style): ans = {} for edge in 'Left Right Top Bottom'.split(): val = getattr(style, 'padding' + edge) + getattr(style, 'margin' + edge) ans['dist' + edge[0]] = str(pt_to_emu(val)) return ans
def get_image_margins(style): ans = {} for edge in 'Left Right Top Bottom'.split(): val = as_num(getattr(style, 'padding' + edge)) + as_num(getattr(style, 'margin' + edge)) ans['dist' + edge[0]] = unicode_type(pt_to_emu(val)) return ans