diff options
author | Jens-Heiner Rechtien <hr@openoffice.org> | 2009-07-27 17:18:56 +0000 |
---|---|---|
committer | Jens-Heiner Rechtien <hr@openoffice.org> | 2009-07-27 17:18:56 +0000 |
commit | f9f79d56997f53be03fd4cf6d84aa2b6195f6b6a (patch) | |
tree | 7de6e84eed538e625e42acc50c72ab6169138090 /svx | |
parent | 3160055c323a9bcdc304b62d12b019d98da3218d (diff) |
CWS-TOOLING: integrate CWS cmcfixes60
2009-07-03 21:56:04 +0200 cmc r273718 : #i103313# org.openoffice.System not org.openoffice.Setup for looking up default locale
2009-07-01 17:15:31 +0200 cmc r273606 : #i102636# extra rounding precision
2009-07-01 11:04:47 +0200 cmc r273556 : #i100000# workaround build issue
2009-06-30 17:27:41 +0200 cmc r273525 : #i102636# extra rounding precision
2009-06-30 09:42:46 +0200 cmc r273491 : #i102634# numbers got mixed up somehow
2009-06-30 09:19:56 +0200 cmc r273490 : CWS-TOOLING: rebase CWS cmcfixes60 to trunk@273468 (milestone: DEV300:m51)
2009-06-22 12:54:45 +0200 cmc r273217 : #i103000# micro-optimization to remove unused symbols from fpicker etc.
2009-06-19 10:06:21 +0200 cmc r273148 : #i102932# put same type into an Any as we take out of that Any, affect 64bit
2009-06-13 17:38:42 +0200 cmc r272957 : #i102742# gcc44 warnings, return of const primitive type doesn't mean anything
2009-06-13 16:22:40 +0200 cmc r272955 : #i102737# keep existing logic and silence new gcc44 warnings
2009-06-13 16:06:25 +0200 cmc r272954 : #i102736# confirm existing logic to be gcc44 warnings free
2009-06-10 19:40:24 +0200 cmc r272837 : #i87461# 64bit color lossage
2009-06-10 19:23:38 +0200 cmc r272836 : #i102636# tidy up UI rounding errors
Diffstat (limited to 'svx')
-rw-r--r-- | svx/source/cui/page.cxx | 46 | ||||
-rw-r--r-- | svx/source/cui/page.h | 4 |
2 files changed, 28 insertions, 22 deletions
diff --git a/svx/source/cui/page.cxx b/svx/source/cui/page.cxx index deb57fbddfb1..f842af6b7559 100644 --- a/svx/source/cui/page.cxx +++ b/svx/source/cui/page.cxx @@ -596,18 +596,24 @@ void SvxPageDescPage::Reset( const SfxItemSet& rSet ) aBspWin.SetSize( Size( ConvertLong_Impl( aPaperSize.Width(), eUnit ), ConvertLong_Impl( aPaperSize.Height(), eUnit ) ) ); - // Werte in die Edits eintragen - SetMetricValue( aPaperHeightEdit, aPaperSize.Height(), eUnit ); - SetMetricValue( aPaperWidthEdit, aPaperSize.Width(), eUnit ); - aPaperSizeBox.Clear(); + aPaperSize = OutputDevice::LogicToLogic(aPaperSize, (MapUnit)eUnit, MAP_100TH_MM); + if ( bLandscape ) + Swap( aPaperSize ); + + // Actual Paper Format + Paper ePaper = SvxPaperInfo::GetSvxPaper( aPaperSize, MAP_100TH_MM, TRUE ); - // Papierformate - Size aTmpSize = aPaperSize; + if ( PAPER_USER != ePaper ) + aPaperSize = SvxPaperInfo::GetPaperSize( ePaper, MAP_100TH_MM ); if ( bLandscape ) - Swap( aTmpSize ); - // aktuelles Format - Paper ePaper = SvxPaperInfo::GetSvxPaper( aTmpSize, (MapUnit)eUnit, TRUE ); + Swap( aPaperSize ); + + // Werte in die Edits eintragen + SetMetricValue( aPaperHeightEdit, aPaperSize.Height(), SFX_MAPUNIT_100TH_MM ); + SetMetricValue( aPaperWidthEdit, aPaperSize.Width(), SFX_MAPUNIT_100TH_MM ); + aPaperSizeBox.Clear(); + USHORT nActPos = LISTBOX_ENTRY_NOTFOUND; USHORT nAryId = RID_SVXSTRARY_PAPERSIZE_STD; @@ -1044,19 +1050,19 @@ IMPL_LINK( SvxPageDescPage, PaperSizeSelect_Impl, ListBox *, pBox ) if ( ePaper != PAPER_USER ) { - Size aSize( SvxPaperInfo::GetPaperSize( ePaper ) ); + Size aSize( SvxPaperInfo::GetPaperSize( ePaper, MAP_100TH_MM ) ); if ( aLandscapeBtn.IsChecked() ) Swap( aSize ); - if ( aSize.Height() < aPaperHeightEdit.GetMin( FUNIT_TWIP ) ) + if ( aSize.Height() < aPaperHeightEdit.GetMin( FUNIT_100TH_MM ) ) aPaperHeightEdit.SetMin( - aPaperHeightEdit.Normalize( aSize.Height() ), FUNIT_TWIP ); - if ( aSize.Width() < aPaperWidthEdit.GetMin( FUNIT_TWIP ) ) + aPaperHeightEdit.Normalize( aSize.Height() ), FUNIT_100TH_MM ); + if ( aSize.Width() < aPaperWidthEdit.GetMin( FUNIT_100TH_MM ) ) aPaperWidthEdit.SetMin( - aPaperWidthEdit.Normalize( aSize.Width() ), FUNIT_TWIP ); - SetMetricValue( aPaperHeightEdit, aSize.Height(), SFX_MAPUNIT_TWIP ); - SetMetricValue( aPaperWidthEdit, aSize.Width(), SFX_MAPUNIT_TWIP ); + aPaperWidthEdit.Normalize( aSize.Width() ), FUNIT_100TH_MM ); + SetMetricValue( aPaperHeightEdit, aSize.Height(), SFX_MAPUNIT_100TH_MM ); + SetMetricValue( aPaperWidthEdit, aSize.Width(), SFX_MAPUNIT_100TH_MM ); // R"ander ggf. neu berechnen CalcMargin_Impl(); @@ -1145,12 +1151,12 @@ IMPL_LINK( SvxPageDescPage, SwapOrientation_Impl, RadioButton *, pBtn ) { bLandscape = aLandscapeBtn.IsChecked(); - const long lWidth = GetCoreValue( aPaperWidthEdit, SFX_MAPUNIT_TWIP ); - const long lHeight = GetCoreValue( aPaperHeightEdit, SFX_MAPUNIT_TWIP ); + const long lWidth = GetCoreValue( aPaperWidthEdit, SFX_MAPUNIT_100TH_MM ); + const long lHeight = GetCoreValue( aPaperHeightEdit, SFX_MAPUNIT_100TH_MM ); // swap with and height - SetMetricValue( aPaperWidthEdit, lHeight, SFX_MAPUNIT_TWIP ); - SetMetricValue( aPaperHeightEdit, lWidth, SFX_MAPUNIT_TWIP ); + SetMetricValue( aPaperWidthEdit, lHeight, SFX_MAPUNIT_100TH_MM ); + SetMetricValue( aPaperHeightEdit, lWidth, SFX_MAPUNIT_100TH_MM ); // recalculate margins if necessary CalcMargin_Impl(); diff --git a/svx/source/cui/page.h b/svx/source/cui/page.h index 4a114b278cca..98aefdc79cc4 100644 --- a/svx/source/cui/page.h +++ b/svx/source/cui/page.h @@ -60,7 +60,7 @@ #define PAPERSIZE_MONARCH 25 #define PAPERSIZE_COM675 26 #define PAPERSIZE_COM9 27 -#define PAPERSIZE_COM10 29 +#define PAPERSIZE_COM10 28 #define PAPERSIZE_COM11 29 #define PAPERSIZE_COM12 30 #define PAPERSIZE_KAI16 31 @@ -68,7 +68,7 @@ #define PAPERSIZE_KAI32BIG 33 #define PAPERSIZE_B4_JIS 34 #define PAPERSIZE_B5_JIS 35 -#define PAPERSIZE_B6_JIS 38 +#define PAPERSIZE_B6_JIS 36 #endif |