All pastes #1335900 Raw Edit

patch for issue 98525

public text v1 · immutable
#1335900 ·published 2009-02-13 10:08 UTC
rendered paste body
Index: source/window/menu.cxx
===================================================================
--- source/window/menu.cxx	(revision 267638)
+++ source/window/menu.cxx	(working copy)
@@ -81,6 +81,8 @@
 
 #include "vcl/lazydelete.hxx"
 
+#include <typeinfo>
+
 #include <map>
 
 namespace vcl
@@ -3578,6 +3580,13 @@
     {
         SalMenu* pMenu = ImplGetSalMenu();
         Rectangle aNativeRect( aRect );
+        
+        fprintf( stderr, "PopupMenu::Execute: pW->IsRTLEnabled() = %s, pWin->IsRTLEnabled() = %s\n"
+            "pW: type %s\n",
+            pW->IsRTLEnabled() ? "true" : "false",
+            pWin->IsRTLEnabled() ? "true" : "false",
+            typeid(*pW).name() );
+        
         if( pW->IsRTLEnabled() && Application::GetSettings().GetLayoutRTL() )
         {
             Point aPt( aRect.TopLeft() );
Index: source/window/window.cxx
===================================================================
--- source/window/window.cxx	(revision 267638)
+++ source/window/window.cxx	(working copy)
@@ -3015,6 +3015,7 @@
         Window* pWindow = mpWindowImpl->mpFirstChild;
         while ( pWindow )
         {
+            #if 0
             pWindow->mpWindowImpl->mnX        += nHorzScroll;
             pWindow->mpWindowImpl->maPos.X()  += nHorzScroll;
             pWindow->mpWindowImpl->mnY        += nVertScroll;
@@ -3034,6 +3035,11 @@
             {
                 pWindow->mpWindowImpl->mbCallMove = TRUE;
             }
+            #else
+            Point aPos = pWindow->GetPosPixel();
+            aPos += Point( nHorzScroll, nVertScroll );
+            pWindow->SetPosPixel( aPos );
+            #endif
 
             pWindow = pWindow->mpWindowImpl->mpNext;
         }
@@ -7176,6 +7182,13 @@
 void Window::SetPosSizePixel( long nX, long nY,
                               long nWidth, long nHeight, USHORT nFlags )
 {
+    const char* pTypeName = typeid(*this).name();
+    if( strcmp( pTypeName, "8SwPostIt" ) == 0 )
+        fprintf( stderr, "%s posSize %ld,%ld   %ld,%ld, pos = %s, size = %s\n",
+            pTypeName, nX, nY, nWidth, nHeight,
+            (nFlags&WINDOW_POSSIZE_POS) ? "true" : "false",
+            (nFlags&WINDOW_POSSIZE_SIZE) ? "true" : "false"
+            );
     DBG_CHKTHIS( Window, ImplDbgCheckWindow );
 
     BOOL bHasValidSize = !mpWindowImpl->mbDefSize;
Index: aqua/source/gdi/salgdi.cxx
===================================================================
--- aqua/source/gdi/salgdi.cxx	(revision 267638)
+++ aqua/source/gdi/salgdi.cxx	(working copy)
@@ -1745,12 +1745,19 @@
 
 long AquaSalGraphics::GetGraphicsWidth() const
 {
-	if( mrContext && (mbWindow || mbVirDev) )
-	{
-		return mnWidth; //CGBitmapContextGetWidth( mrContext );
-	}
-    else
-        return 0;
+    long w = 0;
+    if( mrContext && (mbWindow || mbVirDev) )
+    {
+        w = mnWidth;
+    }
+    
+    if( w == 0 )
+    {
+        if( mbWindow && mpFrame )
+            w = mpFrame->maGeometry.nWidth;
+    }
+    
+    return w;
 }
 
 // -----------------------------------------------------------------------