vcl/source/window/builder.cxx | 5 +++++ vcl/source/window/layout.cxx | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-)
New commits: commit 84d4523539e06f6f40ad01b5dc404208d332d1e1 Author: Caolán McNamara <caol...@redhat.com> Date: Thu Mar 29 10:27:27 2012 +0100 fix pack-end and import pack-type diff --git a/vcl/source/window/builder.cxx b/vcl/source/window/builder.cxx index bf66d05..ac89bfd 100644 --- a/vcl/source/window/builder.cxx +++ b/vcl/source/window/builder.cxx @@ -366,6 +366,11 @@ void VclBuilder::applyPackingProperty(Window *pCurrent, { pCurrent->setChildProperty(sKey, static_cast<sal_uInt16>(sValue.toInt32())); } + else if (sKey.equalsL(RTL_CONSTASCII_STRINGPARAM("pack_type"))) + { + sal_Int32 nPackType = (sValue[0] == 'e' || sValue[0] == 'e') ? VCL_PACK_END : VCL_PACK_START; + pCurrent->setChildProperty(rtl::OString("pack-type"), nPackType); + } else fprintf(stderr, "unknown packing %s\n", sKey.getStr()); } diff --git a/vcl/source/window/layout.cxx b/vcl/source/window/layout.cxx index f5d8b41..9d2f2be 100644 --- a/vcl/source/window/layout.cxx +++ b/vcl/source/window/layout.cxx @@ -133,9 +133,9 @@ void VclBox::setAllocation(const Size &rAllocation) rtl::OString sPackType(RTL_CONSTASCII_STRINGPARAM("pack-type")); rtl::OString sFill(RTL_CONSTASCII_STRINGPARAM("fill")); - Point aPos(nBorderWidth, nBorderWidth); for (sal_Int32 ePackType = VCL_PACK_START; ePackType <= VCL_PACK_END; ++ePackType) { + Point aPos(nBorderWidth, nBorderWidth); if (ePackType == VCL_PACK_END) { long nPrimaryCoordinate = getPrimaryCoordinate(aPos); @@ -197,7 +197,7 @@ void VclBox::setAllocation(const Size &rAllocation) { setPrimaryCoordinate(aPos, nPrimaryCoordinate - nDiff); setPrimaryCoordinate(aChildPos, getPrimaryCoordinate(aChildPos) - - getPrimaryDimension(aChildSize)); + getPrimaryDimension(aBoxSize)); } pChild->SetPosSizePixel(aChildPos, aChildSize);
_______________________________________________ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits