Hi Christian,

Ok, thank you. Later I will submit the patch.

BestRegards,
 
LiuJianli
------------------------------------
RedFlag Chinese2000 Software Co.Ltd.
[email protected]
----- Original Message ----- 
From: "Christian Lippka" <[email protected]>
To: <[email protected]>
Cc: "liujianli" <[email protected]>
Sent: Tuesday, August 24, 2010 7:36 PM
Subject: Re: [graphics-dev] [Issue 113977] After check "keep ratio" checkbox, 
the width of Numbering was changed as same as height


> Hi liujianli,
> 
> sounds fine by me.
> 
> Regards,
> Christian
> 
> Am 20.08.2010 09:58, schrieb liujianli:
>> 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]
>> 
> 
> 
> -- 
> ORACLE
> Christian Lippka | Software Engineer
> Oracle Office GBU
> 
> ORACLE Deutschland B.V. & Co. KG | Nagelsweg 55 | 20097 Hamburg
> 
> ORACLE Deutschland B.V. & Co. KG
> Hauptverwaltung: Riesstr. 25, D-80992 München
> Registergericht: Amtsgericht München, HRA 95603
> 
> Komplementärin: ORACLE Deutschland Verwaltung B.V.
> Rijnzathe 6, 3454PV De Meern, Niederlande
> Handelsregister der Handelskammer Midden-Niederlande, Nr. 30143697
> Geschäftsführer: Jürgen Kunz, Marcel van de Molen, Alexander van der Ven
> 
> Oracle is committed to developing practices and products that help
> protect the environment

Reply via email to