summaryrefslogtreecommitdiff
path: root/sdext/source/presenter/PresenterButton.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sdext/source/presenter/PresenterButton.cxx')
-rw-r--r--sdext/source/presenter/PresenterButton.cxx34
1 files changed, 24 insertions, 10 deletions
diff --git a/sdext/source/presenter/PresenterButton.cxx b/sdext/source/presenter/PresenterButton.cxx
index 00e18429c134..ac8e813379d5 100644
--- a/sdext/source/presenter/PresenterButton.cxx
+++ b/sdext/source/presenter/PresenterButton.cxx
@@ -17,6 +17,7 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
+#include "vcl/svapp.hxx"
#include "PresenterButton.hxx"
#include "PresenterCanvasHelper.hxx"
#include "PresenterController.hxx"
@@ -301,7 +302,6 @@ void SAL_CALL PresenterButton::mousePressed (const css::awt::MouseEvent& rEvent)
{
(void)rEvent;
ThrowIfDisposed();
-
meState = PresenterBitmapDescriptor::ButtonDown;
}
@@ -413,15 +413,29 @@ void PresenterButton::RenderButton (
rendering::RenderState aRenderState (geometry::AffineMatrix2D(1,0,0, 0,1,0), NULL,
Sequence<double>(4), rendering::CompositeOperation::SOURCE);
PresenterCanvasHelper::SetDeviceColor(aRenderState, rpFont->mnColor);
- aRenderState.AffineTransform.m02 = (rSize.Width - aTextBBox.X2 + aTextBBox.X1)/2;
- aRenderState.AffineTransform.m12 = (rSize.Height - aTextBBox.Y2 + aTextBBox.Y1)/2 - aTextBBox.Y1;
-
- rxCanvas->drawText(
- aContext,
- rpFont->mxFont,
- rendering::ViewState(geometry::AffineMatrix2D(1,0,0, 0,1,0), NULL),
- aRenderState,
- rendering::TextDirection::WEAK_LEFT_TO_RIGHT);
+ /// this is responsible of the close button
+ /// check whether RTL interface or not
+ if(!Application::GetSettings().GetLayoutRTL()){
+ aRenderState.AffineTransform.m02 = (rSize.Width - aTextBBox.X2 + aTextBBox.X1)/2;
+ aRenderState.AffineTransform.m12 = (rSize.Height - aTextBBox.Y2 + aTextBBox.Y1)/2 - aTextBBox.Y1;
+
+ rxCanvas->drawText(
+ aContext,
+ rpFont->mxFont,
+ rendering::ViewState(geometry::AffineMatrix2D(1,0,0, 0,1,0), NULL),
+ aRenderState,
+ rendering::TextDirection::WEAK_LEFT_TO_RIGHT);
+ }else{
+ aRenderState.AffineTransform.m02 = (rSize.Width + aTextBBox.X2 - aTextBBox.X1)/2;
+ aRenderState.AffineTransform.m12 = (rSize.Height - aTextBBox.Y2 + aTextBBox.Y1)/2 - aTextBBox.Y1;
+
+ rxCanvas->drawText(
+ aContext,
+ rpFont->mxFont,
+ rendering::ViewState(geometry::AffineMatrix2D(1,0,0, 0,1,0), NULL),
+ aRenderState,
+ rendering::TextDirection::WEAK_RIGHT_TO_LEFT);
+ }
}
void PresenterButton::Invalidate (void)