summaryrefslogtreecommitdiff
path: root/vcl/source/gdi/salgdilayout.cxx
diff options
context:
space:
mode:
authorJens-Heiner Rechtien <hr@openoffice.org>2004-02-03 10:53:51 +0000
committerJens-Heiner Rechtien <hr@openoffice.org>2004-02-03 10:53:51 +0000
commitbe5da2e44db1d5862d70b4f3938a51d597efe5be (patch)
tree956de2bd17f16babdde2f751e877387cf4afc1f9 /vcl/source/gdi/salgdilayout.cxx
parent89892e061f54abca94cd6725aeb3c989c379fb57 (diff)
INTEGRATION: CWS calcrtl (1.12.166); FILE MERGED
2004/01/13 10:21:17 sab 1.12.166.3: RESYNC: (1.13-1.15); FILE MERGED 2003/11/27 10:51:38 nn 1.12.166.2: RESYNC: (1.12-1.13); FILE MERGED 2003/11/10 10:22:10 ssa 1.12.166.1: #106948# improved mirroring
Diffstat (limited to 'vcl/source/gdi/salgdilayout.cxx')
-rw-r--r--vcl/source/gdi/salgdilayout.cxx50
1 files changed, 35 insertions, 15 deletions
diff --git a/vcl/source/gdi/salgdilayout.cxx b/vcl/source/gdi/salgdilayout.cxx
index 279abaefe8aa..c0735f9f909e 100644
--- a/vcl/source/gdi/salgdilayout.cxx
+++ b/vcl/source/gdi/salgdilayout.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: salgdilayout.cxx,v $
*
- * $Revision: 1.15 $
+ * $Revision: 1.16 $
*
- * last change: $Author: vg $ $Date: 2004-01-06 13:55:08 $
+ * last change: $Author: hr $ $Date: 2004-02-03 11:53:51 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -140,9 +140,9 @@
#ifndef _SV_SALLAYOUT_HXX
#include <sallayout.hxx>
#endif
+#undef private
-#define IS_NOTRTL_ENABLED() ( pOutDev && !pOutDev->IsRTLEnabled() )
-
+//#define USE_NEW_RTL_IMPLEMENTATION
// ----------------------------------------------------------------------------
// The only common SalFrame method
@@ -189,14 +189,20 @@ void SalGraphics::mirror( long& x, const OutputDevice *pOutDev )
if( w )
{
- x = w-1-x;
-
if( pOutDev && !pOutDev->IsRTLEnabled() )
{
+ OutputDevice *pOutDevRef = (OutputDevice*) pOutDev;
+#ifdef USE_NEW_RTL_IMPLEMENTATION
+ if( pOutDev->meOutDevType == OUTDEV_WINDOW )
+ pOutDevRef = (OutputDevice*) ((Window *) pOutDev)->mpDummy4; // top of non-mirroring hierarchy
+#endif
+
// mirror this window back
- long devX = w-pOutDev->GetOutputWidthPixel()-pOutDev->GetOutOffXPixel(); // re-mirrored mnOutOffX
- x = devX + ( pOutDev->GetOutputWidthPixel() - 1 - (x - devX) ) ;
+ long devX = w-pOutDevRef->GetOutputWidthPixel()-pOutDevRef->GetOutOffXPixel(); // re-mirrored mnOutOffX
+ x = devX + (x - pOutDevRef->GetOutOffXPixel());
}
+ else
+ x = w-1-x;
}
}
@@ -210,14 +216,21 @@ void SalGraphics::mirror( long& x, long& nWidth, const OutputDevice *pOutDev )
if( w )
{
- x = w-nWidth-x;
-
if( pOutDev && !pOutDev->IsRTLEnabled() )
{
+ OutputDevice *pOutDevRef = (OutputDevice*) pOutDev;
+#ifdef USE_NEW_RTL_IMPLEMENTATION
+ if( pOutDev->meOutDevType == OUTDEV_WINDOW )
+ pOutDevRef = (OutputDevice*) ((Window *) pOutDev)->mpDummy4; // top of non-mirroring hierarchy
+#endif
+
// mirror this window back
- long devX = w-pOutDev->GetOutputWidthPixel()-pOutDev->GetOutOffXPixel(); // re-mirrored mnOutOffX
- x = devX + ( pOutDev->GetOutputWidthPixel() - nWidth - (x - devX) ) ;
+ long devX = w-pOutDevRef->GetOutputWidthPixel()-pOutDevRef->GetOutOffXPixel(); // re-mirrored mnOutOffX
+ x = devX + (x - pOutDevRef->GetOutOffXPixel());
}
+ else
+ x = w-nWidth-x;
+
}
}
@@ -235,12 +248,19 @@ BOOL SalGraphics::mirror( sal_uInt32 nPoints, const SalPoint *pPtAry, SalPoint *
if( pOutDev && !pOutDev->IsRTLEnabled() )
{
+ OutputDevice *pOutDevRef = (OutputDevice*) pOutDev;
+#ifdef USE_NEW_RTL_IMPLEMENTATION
+ if( pOutDev->meOutDevType == OUTDEV_WINDOW )
+ pOutDevRef = (OutputDevice*) ((Window *) pOutDev)->mpDummy4; // top of non-mirroring hierarchy
+#endif
+
// mirror this window back
- long devX = w-pOutDev->GetOutputWidthPixel()-pOutDev->GetOutOffXPixel(); // re-mirrored mnOutOffX
+ long devX = w-pOutDevRef->GetOutputWidthPixel()-pOutDevRef->GetOutOffXPixel(); // re-mirrored mnOutOffX
for( i=0, j=nPoints-1; i<nPoints; i++,j-- )
{
- long x = w-1-pPtAry[i].mnX;
- pPtAry2[j].mnX = devX + ( pOutDev->GetOutputWidthPixel() - 1 - (x - devX) );
+ //long x = w-1-pPtAry[i].mnX;
+ //pPtAry2[j].mnX = devX + ( pOutDevRef->mnOutWidth - 1 - (x - devX) );
+ pPtAry2[j].mnX = devX + (pPtAry[i].mnX - pOutDevRef->GetOutOffXPixel());
pPtAry2[j].mnY = pPtAry[i].mnY;
}
}