diff options
author | RĂ¼diger Timm <rt@openoffice.org> | 2007-05-29 14:57:55 +0000 |
---|---|---|
committer | RĂ¼diger Timm <rt@openoffice.org> | 2007-05-29 14:57:55 +0000 |
commit | 644541cd9961419c47b814c91eb428892baba1bf (patch) | |
tree | 9ee3f961f7edf655420978276df78837f82ef8a6 /svx/source/dialog/svxruler.cxx | |
parent | INTEGRATION: CWS os97 (1.18.16); FILE MERGED (diff) | |
download | core-644541cd9961419c47b814c91eb428892baba1bf.tar.gz core-644541cd9961419c47b814c91eb428892baba1bf.zip |
INTEGRATION: CWS os97 (1.34.308); FILE MERGED
2007/05/14 13:54:05 os 1.34.308.1: #i73321# fix offset in horizontal ruler in RTL mode
Diffstat (limited to 'svx/source/dialog/svxruler.cxx')
-rw-r--r-- | svx/source/dialog/svxruler.cxx | 26 |
1 files changed, 22 insertions, 4 deletions
diff --git a/svx/source/dialog/svxruler.cxx b/svx/source/dialog/svxruler.cxx index c2ebdb246d11..b11e540aaf18 100644 --- a/svx/source/dialog/svxruler.cxx +++ b/svx/source/dialog/svxruler.cxx @@ -4,9 +4,9 @@ * * $RCSfile: svxruler.cxx,v $ * - * $Revision: 1.35 $ + * $Revision: 1.36 $ * - * last change: $Author: kz $ $Date: 2007-05-10 14:42:08 $ + * last change: $Author: rt $ $Date: 2007-05-29 15:57:55 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -71,6 +71,9 @@ #include "tstpitem.hxx" #include "lrspitem.hxx" #include "protitem.hxx" +#ifndef _APP_HXX +#include <vcl/svapp.hxx> +#endif #ifndef RULER_TAB_RTL #define RULER_TAB_RTL ((USHORT)0x0010) #endif @@ -1084,8 +1087,23 @@ void SvxRuler::UpdatePage() else SetPagePos(); - Point aPos(pEditWin->GetPosPixel()-GetPosPixel()); - long lPos= bHorz ? aPos.X() : aPos.Y(); + long lPos = 0; + Point aOwnPos = GetPosPixel(); + Point aEdtWinPos = pEditWin->GetPosPixel(); + if( Application::GetSettings().GetLayoutRTL() && bHorz ) + { + //#i73321# in RTL the window and the ruler is not mirrored but the + // influence of the vertical ruler is inverted + Size aOwnSize = GetSizePixel(); + Size aEdtWinSize = pEditWin->GetSizePixel(); + lPos = aOwnSize.Width() - aEdtWinSize.Width(); + lPos -= (aEdtWinPos - aOwnPos).X(); + } + else + { + Point aPos(aEdtWinPos - aOwnPos); + lPos= bHorz ? aPos.X() : aPos.Y(); + } // Leider bekommen wir den Offset des Editfensters zum Lineal nie // per Statusmeldung. Also setzen wir ihn selbst, wenn noetig. |