summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--vcl/source/window/builder.cxx5
-rw-r--r--vcl/source/window/layout.cxx4
2 files changed, 7 insertions, 2 deletions
diff --git a/vcl/source/window/builder.cxx b/vcl/source/window/builder.cxx
index bf66d059de64..ac89bfd46bb5 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 f5d8b4124ee5..9d2f2be5178d 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);