diff options
author | Eike Rathke <erack@redhat.com> | 2011-11-04 13:40:18 +0100 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2011-11-04 13:49:43 +0100 |
commit | 3976f78ac001ad3d14d3fdcd6c53e967ea656037 (patch) | |
tree | 3fe758a35114d2d6094798a4cee37fd6fb9ff6be /sc/source/ui | |
parent | 07d0503fc641edc988a0142eedfeb79f1bd594a9 (diff) |
Fixed fdo#37083 mis-positioning caused by internal TeX points.
* Changed Calc's internal definition of points per inch from TeX points (72.27
points per inch) to PostScript points (72 points per inch) as used by the
rest of the world (except TeX).
* Aligns between internal representation and API that at various places
assumed PS points already.
* Fixes mis-positioning and bad sizing of drawing layer objects relative to
column widths and row heights.
* More precise printout of column widths and row heights.
* UI dialogs such as Column Width always assumed PS points, so earlier
versions actually displayed wrong metric (and imperial) units.
* Printouts now are slightly larger due to 0.27 points less in an inch, but
more accurate in reflecting the actual UI values, and drawing layer objects'
position and size match the row heights and column widths.
- Problems with drawing layer objects and zoomed view versus Page Preview
versus printout that don't align still persist.
- Problems with resized rows and misplaced drawing layer objects are also not
magically healed.
Diffstat (limited to 'sc/source/ui')
-rw-r--r-- | sc/source/ui/unoobj/cellsuno.cxx | 5 | ||||
-rw-r--r-- | sc/source/ui/unoobj/defltuno.cxx | 6 | ||||
-rw-r--r-- | sc/source/ui/unoobj/docuno.cxx | 5 | ||||
-rw-r--r-- | sc/source/ui/unoobj/styleuno.cxx | 5 | ||||
-rw-r--r-- | sc/source/ui/view/cellsh3.cxx | 6 |
5 files changed, 12 insertions, 15 deletions
diff --git a/sc/source/ui/unoobj/cellsuno.cxx b/sc/source/ui/unoobj/cellsuno.cxx index 748b3c0b3cc1..aa45cc0ec816 100644 --- a/sc/source/ui/unoobj/cellsuno.cxx +++ b/sc/source/ui/unoobj/cellsuno.cxx @@ -815,9 +815,8 @@ const SvxItemPropertySet* lcl_GetEditPropertySet() //------------------------------------------------------------------------ -//! diese Funktionen in einen allgemeinen Header verschieben -inline long TwipsToHMM(long nTwips) { return (nTwips * 127 + 36) / 72; } -inline long HMMToTwips(long nHMM) { return (nHMM * 72 + 63) / 127; } +using sc::HMMToTwips; +using sc::TwipsToHMM; //------------------------------------------------------------------------ diff --git a/sc/source/ui/unoobj/defltuno.cxx b/sc/source/ui/unoobj/defltuno.cxx index 916d958f4641..56116d4c657a 100644 --- a/sc/source/ui/unoobj/defltuno.cxx +++ b/sc/source/ui/unoobj/defltuno.cxx @@ -82,9 +82,9 @@ const SfxItemPropertyMapEntry* lcl_GetDocDefaultsMap() return aDocDefaultsMap_Impl; } -inline long TwipsToHMM(long nTwips) { return (nTwips * 127 + 36) / 72; } -inline long HMMToTwips(long nHMM) { return (nHMM * 72 + 63) / 127; } -inline long TwipsToEvenHMM(long nTwips) { return ( (nTwips * 127 + 72) / 144 ) * 2; } +using sc::HMMToTwips; +using sc::TwipsToHMM; +using sc::TwipsToEvenHMM; //------------------------------------------------------------------------ diff --git a/sc/source/ui/unoobj/docuno.cxx b/sc/source/ui/unoobj/docuno.cxx index 7332edab9b24..8015b2c876af 100644 --- a/sc/source/ui/unoobj/docuno.cxx +++ b/sc/source/ui/unoobj/docuno.cxx @@ -195,9 +195,8 @@ const SfxItemPropertyMapEntry* lcl_GetRowsPropertyMap() return aRowsPropertyMap_Impl; } -//! move these functions to a header file -inline long TwipsToHMM(long nTwips) { return (nTwips * 127 + 36) / 72; } -inline long HMMToTwips(long nHMM) { return (nHMM * 72 + 63) / 127; } +using sc::HMMToTwips; +using sc::TwipsToHMM; //------------------------------------------------------------------------ diff --git a/sc/source/ui/unoobj/styleuno.cxx b/sc/source/ui/unoobj/styleuno.cxx index 903f41c26f97..41cef8d44003 100644 --- a/sc/source/ui/unoobj/styleuno.cxx +++ b/sc/source/ui/unoobj/styleuno.cxx @@ -383,9 +383,8 @@ static sal_uInt16 aStyleFamilyTypes[SC_STYLE_FAMILY_COUNT] = { SFX_STYLE_FAMILY_ //------------------------------------------------------------------------ -//! diese Funktionen in einen allgemeinen Header verschieben -inline long TwipsToHMM(long nTwips) { return (nTwips * 127 + 36) / 72; } -inline long HMMToTwips(long nHMM) { return (nHMM * 72 + 63) / 127; } +using sc::HMMToTwips; +using sc::TwipsToHMM; //------------------------------------------------------------------------ diff --git a/sc/source/ui/view/cellsh3.cxx b/sc/source/ui/view/cellsh3.cxx index b7d6750b3314..6630064432b4 100644 --- a/sc/source/ui/view/cellsh3.cxx +++ b/sc/source/ui/view/cellsh3.cxx @@ -61,9 +61,9 @@ #define IS_EDITMODE() GetViewData()->HasEditView( GetViewData()->GetActivePart() ) -inline long TwipsToHMM(long nTwips) { return (nTwips * 127 + 36) / 72; } -inline long HMMToTwips(long nHMM) { return (nHMM * 72 + 63) / 127; } -inline long TwipsToEvenHMM(long nTwips) { return ( (nTwips * 127 + 72) / 144 ) * 2; } +using sc::HMMToTwips; +using sc::TwipsToHMM; +using sc::TwipsToEvenHMM; //------------------------------------------------------------------ |