diff options
author | Noel Grandin <noel@peralex.com> | 2015-03-26 13:32:44 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2015-03-27 08:33:44 +0200 |
commit | b3464e87ae2115e394d5a9f85b4aaf88d485d7f1 (patch) | |
tree | d8d5792c69e4d8be1f2962b83b3a2f05e804fd2d | |
parent | 93ddb2cc0bedac9a97260826741f7dfcdca0947d (diff) |
convert SymbolAlign to enum class
Change-Id: Iecc1400809212f56915cad56b739378cda49b90f
-rw-r--r-- | include/tools/wintypes.hxx | 2 | ||||
-rw-r--r-- | vcl/source/control/button.cxx | 4 | ||||
-rw-r--r-- | vcl/source/control/morebtn.cxx | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/include/tools/wintypes.hxx b/include/tools/wintypes.hxx index e9282da388a7..6abb4b6d8dc4 100644 --- a/include/tools/wintypes.hxx +++ b/include/tools/wintypes.hxx @@ -291,7 +291,7 @@ enum ImageAlign { IMAGEALIGN_LEFT, IMAGEALIGN_TOP, IMAGEALIGN_RIGHT, IMAGEALIGN_ IMAGEALIGN_LEFT_TOP, IMAGEALIGN_LEFT_BOTTOM, IMAGEALIGN_TOP_LEFT, IMAGEALIGN_TOP_RIGHT, IMAGEALIGN_RIGHT_TOP, IMAGEALIGN_RIGHT_BOTTOM, IMAGEALIGN_BOTTOM_LEFT, IMAGEALIGN_BOTTOM_RIGHT, IMAGEALIGN_CENTER }; -enum SymbolAlign { SYMBOLALIGN_LEFT, SYMBOLALIGN_RIGHT }; +enum class SymbolAlign { LEFT, RIGHT }; // ButtonDialog-Types diff --git a/vcl/source/control/button.cxx b/vcl/source/control/button.cxx index e6a1d34ffbbd..542b54c99dfa 100644 --- a/vcl/source/control/button.cxx +++ b/vcl/source/control/button.cxx @@ -79,7 +79,7 @@ public: }; ImplCommonButtonData::ImplCommonButtonData() : maFocusRect(), mnSeparatorX(0), mnButtonState(0), -mbSmallSymbol(false), maImage(), meImageAlign(IMAGEALIGN_TOP), meSymbolAlign(SYMBOLALIGN_LEFT) +mbSmallSymbol(false), maImage(), meImageAlign(IMAGEALIGN_TOP), meSymbolAlign(SymbolAlign::LEFT) { } @@ -463,7 +463,7 @@ void Button::ImplDrawAlignedImage( OutputDevice* pDev, Point& rPos, if ( bHasSymbol ) { - if ( mpButtonData->meSymbolAlign == SYMBOLALIGN_RIGHT ) + if ( mpButtonData->meSymbolAlign == SymbolAlign::RIGHT ) { Point aRightPos = Point( aTextPos.X() + aTextSize.Width() + aSymbolSize.Width()/2, aTextPos.Y() ); *pSymbolRect = Rectangle( aRightPos, aSymbolSize ); diff --git a/vcl/source/control/morebtn.cxx b/vcl/source/control/morebtn.cxx index 8e5e9a6a99be..9d3701ca22ad 100644 --- a/vcl/source/control/morebtn.cxx +++ b/vcl/source/control/morebtn.cxx @@ -47,7 +47,7 @@ void MoreButton::ImplInit( vcl::Window* pParent, WinBits nStyle ) ShowState(); - SetSymbolAlign(SYMBOLALIGN_RIGHT); + SetSymbolAlign(SymbolAlign::RIGHT); SetImageAlign(IMAGEALIGN_RIGHT); //Resoves: fdo#31849 ensure button remains vertically centered SetSmallSymbol(true); |