Hi cl,

I am fixing this issue now.
I found that when open "Bullets and Numbering" dialog twice, the member 
aInitSize of SvxNumOptionsTabPage don't initialize so that the width of 
Numbering was changed as same as height after check "Keep ratio".

See the IMPL_LINK( SvxNumOptionsTabPage, SizeHdl_Impl, MetricField *, pField) 
method in the numpages.cxx

    if (aInitSize[i].Height())
        fSizeRatio = (double)aInitSize[i].Width() / 
(double)aInitSize[i].Height();
    else
        fSizeRatio = (double)1;

    long nDelta = nHeightVal - aInitSize[i].Height();
    aSize.Height() = nHeightVal;
    if (bRatio)
    {
        aSize.Width() = aInitSize[i].Width() + (long)((double)nDelta * 
fSizeRatio);
        aWidthMF.SetUserValue(aWidthMF.Normalize(
            OutputDevice::LogicToLogic( aSize.Width(), (MapUnit)eCoreUnit, 
MAP_100TH_MM )),
                FUNIT_100TH_MM);
    }

So how about initialize the member aInitSize when open the dialog again in the 
SvxNumOptionsTabPage::InitControls() method

The code:

if(bShowBitmap)
{
    if(!bSameVOrient || eFirstOrient == text::VertOrientation::NONE)
        aOrientLB.SetNoSelection();
    else
        aOrientLB.SelectEntryPos(
            sal::static_int_cast< USHORT >(eFirstOrient - 1));
            // kein text::VertOrientation::NONE

    if(bSameSize)
    {
        USHORT nMask = 1;
        for(USHORT i = 0; i < pActNum->GetLevelCount(); i++)
        {
            if(nActNumLvl & nMask)
            {
                SvxNumberFormat aNumFmt(pActNum->GetLevel(i));
                aInitSize[i] = aNumFmt.GetGraphicSize();
            }
            nMask <<= 1;
        }

        SetMetricValue(aHeightMF, aFirstSize.Height(), eCoreUnit);
        SetMetricValue(aWidthMF, aFirstSize.Width(), eCoreUnit);
    }
    else
    {
        aHeightMF.SetText(aEmptyStr);
        aWidthMF.SetText(aEmptyStr);
    }
}

What's your suggestion?


BestRegards,
 
LiuJianli
------------------------------------
RedFlag Chinese2000 Software Co.Ltd.
[email protected]

Reply via email to