diff options
author | Tomaž Vajngerl <quikee@gmail.com> | 2013-07-23 20:43:29 +0200 |
---|---|---|
committer | Tomaž Vajngerl <quikee@gmail.com> | 2013-07-23 20:52:46 +0200 |
commit | 98608e57f21820ec1d2c6cd77f433b6963e249a6 (patch) | |
tree | 126b4ab00fc93cddd09e3eb53ba53efb2119ddf5 /svtools | |
parent | 06c416be33ae727d1b87e5a79cec4a0582aea832 (diff) |
fdo#38144 In ruler snap to markers for tab stops, margins, etc.
Change-Id: Ie7f829b0ec36af79a2a97d9de7b6e37034c22e61
Diffstat (limited to 'svtools')
-rw-r--r-- | svtools/source/control/ruler.cxx | 20 |
1 files changed, 6 insertions, 14 deletions
diff --git a/svtools/source/control/ruler.cxx b/svtools/source/control/ruler.cxx index 0a683692be2a..d1289756cf36 100644 --- a/svtools/source/control/ruler.cxx +++ b/svtools/source/control/ruler.cxx @@ -105,20 +105,7 @@ public: ImplRulerData& operator=( const ImplRulerData& rData ); }; - -struct ImplRulerUnitData -{ - MapUnit eMapUnit; // MAP_UNIT zum Umrechnen - long nTickUnit; // Teiler fuer Einheit - long nTick1; // Schrittweite - long nTick2; // Tick fuer halbe Werte - long nTick3; // Tick fuer Zahlenausgabe - long n100THMM; // Teiler fuer Einheit - sal_uInt16 nUnitDigits; // Anzahl Nachkommastellen - sal_Char aUnitStr[8]; // Einheiten-String -}; - -static ImplRulerUnitData aImplRulerUnitTab[RULER_UNIT_COUNT] = +static RulerUnitData aImplRulerUnitTab[RULER_UNIT_COUNT] = { { MAP_100TH_MM, 100, 25, 50, 100, 100, 3, " mm" }, // MM { MAP_100TH_MM, 1000, 250, 500, 1000, 1000, 3, " cm" }, // CM @@ -2776,6 +2763,11 @@ long Ruler::GetMargin1() const { return mpData->nMargin1; } long Ruler::GetMargin2() const { return mpData->nMargin2; } long Ruler::GetRulerVirHeight() const { return mnVirHeight; } +RulerUnitData Ruler::GetCurrentRulerUnit() const +{ + return aImplRulerUnitTab[mnUnitIndex]; +} + void Ruler::DrawTicks() { mbFormat = sal_True; |