[ooo-build-commit] Branch 'ooo/master' - 2 commits - comphelper/inc comphelper/source svtools/source vcl/aqua

Jan Holesovsky kendy at kemper.freedesktop.org
Thu Jul 16 18:18:45 PDT 2009


 comphelper/inc/comphelper/uieventslogger.hxx |    4 +-
 comphelper/source/misc/uieventslogger.cxx    |   37 ++++++++++++------------
 svtools/source/contnr/fileview.cxx           |    5 ++-
 svtools/source/contnr/svtabbx.cxx            |   41 ++++++++++++++++-----------
 vcl/aqua/source/gdi/salprn.cxx               |   15 +++++++--
 5 files changed, 61 insertions(+), 41 deletions(-)

New commits:
commit 88dc081eeabd3d463f1c39eae6ab35a6e98fb4a5
Author: Ivo Hinkelmann <ihi at openoffice.org>
Date:   Thu Jul 16 16:59:45 2009 +0000

    CWS-TOOLING: integrate CWS mav53_DEV300
    2009-06-29 13:42:56 +0200 hbrinkm  r273471 : #i101593# switched off optimization in table layout, that caused frames to be layouted incorrectly
    2009-06-25 12:29:11 +0200 cd  r273376 : #i101774# Don't rely on initialize call for VistaFilePicker
    2009-06-25 11:48:33 +0200 tl  r273373 : #i101420# Gnome accessibility fix
    2009-06-24 18:16:49 +0200 od  r273361 : #i97309 method <XMLTextParagraphExport::exportListChange(..)>
    	- export text:start-value at correct list item.
    2009-06-23 14:11:44 +0200 b_michaelsen  r273281 : #i103032#: cutting of URL-parameters for usage tracking
    2009-06-22 11:49:12 +0200 b_michaelsen  r273207 : #i102805#: Added usage tracking to SfxToolboxControl
    2009-06-22 11:46:00 +0200 b_michaelsen  r273205 : whitespace fixes
    2009-06-05 14:21:12 +0200 mav  r272683 : #i101741# check the file date only in document file locking context

diff --git a/comphelper/inc/comphelper/uieventslogger.hxx b/comphelper/inc/comphelper/uieventslogger.hxx
index 1c0599a..b797979 100644
--- a/comphelper/inc/comphelper/uieventslogger.hxx
+++ b/comphelper/inc/comphelper/uieventslogger.hxx
@@ -38,7 +38,7 @@
 #include <rtl/ustring.hxx>
 
 
-namespace comphelper 
+namespace comphelper
 {
     // this class is part of the OOo Improvement Program Core
     class COMPHELPER_DLLPUBLIC UiEventsLogger
@@ -46,7 +46,7 @@ namespace comphelper
         public:
             static sal_Bool isEnabled();
             static sal_Int32 getSessionLogEventCount();
-            static void appendDispatchOrigin( ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue>& args, const ::rtl::OUString& originapp, const ::rtl::OUString& originwidget); 
+            static void appendDispatchOrigin( ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue>& args, const ::rtl::OUString& originapp, const ::rtl::OUString& originwidget);
             static ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue> purgeDispatchOrigin(const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue>& args);
             static void logDispatch(const ::com::sun::star::util::URL& url, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue>& args);
             static void logVcl(const ::rtl::OUString& parent_id, sal_Int32 window_type, const ::rtl::OUString& id, const ::rtl::OUString& method, const ::rtl::OUString& param);
diff --git a/comphelper/source/misc/uieventslogger.cxx b/comphelper/source/misc/uieventslogger.cxx
index 4954cd0..6734f81 100644
--- a/comphelper/source/misc/uieventslogger.cxx
+++ b/comphelper/source/misc/uieventslogger.cxx
@@ -101,7 +101,7 @@ namespace
     };
 }
 
-namespace comphelper 
+namespace comphelper
 {
     // declaration of implementation
     class UiEventsLogger_Impl;
@@ -111,7 +111,7 @@ namespace comphelper
             //typedefs and friends
             friend class UiEventsLogger;
             typedef UiEventsLogger_Impl* ptr;
-            
+
             // instance methods and data
             UiEventsLogger_Impl();
             void initializeLogger();
@@ -141,7 +141,7 @@ namespace comphelper
             Reference<XCsvLogFormatter> m_Formatter;
             map<OUString, OUString> m_OriginAppAbbr;
             map<OUString, OUString> m_OriginWidgetAbbr;
-            
+
 
             // static methods and data
             static ptr getInstance();
@@ -246,7 +246,7 @@ namespace comphelper
         args[old_length+1].Name = UiEventsLogger_Impl::LOGORIGINWIDGET;
         args[old_length+1].Value = static_cast<Any>(originwidget);
     }
-    
+
     Sequence<PropertyValue> UiEventsLogger::purgeDispatchOrigin(
         const Sequence<PropertyValue>& args)
     {
@@ -257,7 +257,7 @@ namespace comphelper
                 && args[source_idx].Name != UiEventsLogger_Impl::LOGORIGINWIDGET)
                 result[target_idx++] = args[source_idx];
         result.realloc(target_idx);
-        return result; 
+        return result;
     }
 
     void UiEventsLogger::logDispatch(
@@ -323,7 +323,7 @@ namespace comphelper
         {
             UiEventsLogger_Impl::instance->disposing();
             delete UiEventsLogger_Impl::instance;
-            UiEventsLogger_Impl::instance = NULL; 
+            UiEventsLogger_Impl::instance = NULL;
         }
     }
 
@@ -375,9 +375,10 @@ namespace comphelper
         }
         else
             logdata[2] = UNKNOWN_ORIGIN;
-        logdata[3] = url.Complete;
         if(url.Complete.match(URL_FILE))
             logdata[3] = URL_FILE;
+        else
+            logdata[3] = url.Main;
         m_Logger->log(LogLevel::INFO, m_Formatter->formatMultiColumn(logdata));
         m_SessionLogEventCount++;
     }
@@ -388,7 +389,7 @@ namespace comphelper
         logdata[0] = ETYPE_ROTATED;
         m_Logger->log(LogLevel::INFO, m_Formatter->formatMultiColumn(logdata));
     }
-    
+
     void UiEventsLogger_Impl::logVcl(
         const OUString& parent_id,
         sal_Int32 window_type,
@@ -415,7 +416,7 @@ namespace comphelper
     {
         FileBase::RC result = File::move(getCurrentPath(), getRotatedPath());
         if(result!=FileBase::E_None && result!=FileBase::E_NOENT)
-            m_Active = false; 
+            m_Active = false;
     }
 
     void UiEventsLogger_Impl::hotRotate()
@@ -445,7 +446,7 @@ namespace comphelper
             sm->createInstanceWithArguments(CSSL_FILEHANDLER, init_args);
         m_LogHandler = Reference<XLogHandler>(temp, UNO_QUERY);
     }
-    
+
     void UiEventsLogger_Impl::checkIdleTimeout()
     {
         TimeValue now;
@@ -454,7 +455,7 @@ namespace comphelper
             hotRotate();
         m_LastLogEventTime = now;
     }
-    
+
     OUString UiEventsLogger_Impl::getCurrentPath()
     {
         OUStringBuffer current_path(m_LogPath);
@@ -494,7 +495,7 @@ namespace comphelper
     void UiEventsLogger_Impl::initializeLogger()
     {
         Reference<XMultiServiceFactory> sm = getProcessServiceFactory();
-       
+
         // getting the Core Uno proxy object 
         // It will call disposing and make sure we clear all our references
         {
@@ -510,7 +511,7 @@ namespace comphelper
                 return;
             }
             xDesktop->addTerminateListener(xCore);
-        } 
+        }
         // getting the LoggerPool
         Reference<XLoggerPool> pool;
         {
@@ -518,10 +519,10 @@ namespace comphelper
                 sm->createInstance(CSSL_LOGGERPOOL);
             pool = Reference<XLoggerPool>(temp, UNO_QUERY);
         }
-            
+
         // getting the Logger
         m_Logger = pool->getNamedLogger(LOGGERNAME);
-        
+
         // getting the FileHandler
         prepareLogHandler();
 
@@ -553,12 +554,12 @@ namespace comphelper
         else
             m_Active = false;
     }
-    
+
     // private static UiEventsLogger_Impl 
     bool UiEventsLogger_Impl::shouldActivate()
     {
         return getEnabledFromCfg() && getEnabledFromCoreController();
-    } 
+    }
 
     OUString UiEventsLogger_Impl::getLogPathFromCfg()
     {
@@ -570,7 +571,7 @@ namespace comphelper
             CFG_LOGGING, CFG_OOOIMPROVEMENT, CFG_LOGPATH,
             ConfigurationHelper::E_READONLY
         ) >>= result;
-        
+
         Reference<XStringSubstitution> path_sub(
             sm->createInstance(CSSU_PATHSUB),
             UNO_QUERY);
diff --git a/svtools/source/contnr/fileview.cxx b/svtools/source/contnr/fileview.cxx
index 2ac77de..4619989 100644
--- a/svtools/source/contnr/fileview.cxx
+++ b/svtools/source/contnr/fileview.cxx
@@ -1065,7 +1065,10 @@ BOOL ViewTabListBox_Impl::DoubleClickHdl()
     ::rtl::OUString sRet = SvHeaderTabListBox::GetAccessibleObjectDescription( _eType, _nPos );
     if ( ::svt::BBTYPE_TABLECELL == _eType )
     {
-        sal_Int32 nRow = _nPos / GetColumnCount();
+        sal_Int32 nRow = -1;
+        const sal_uInt16 nColumnCount = GetColumnCount();
+        if (nColumnCount > 0)
+            nRow = _nPos / nColumnCount;
         SvLBoxEntry* pEntry = GetEntry( nRow );
         if ( pEntry )
         {
diff --git a/svtools/source/contnr/svtabbx.cxx b/svtools/source/contnr/svtabbx.cxx
index 03acf6d..30a2ec4 100644
--- a/svtools/source/contnr/svtabbx.cxx
+++ b/svtools/source/contnr/svtabbx.cxx
@@ -980,10 +980,12 @@ Reference< XAccessible > SvHeaderTabListBox::CreateAccessibleCell( sal_Int32 _nR
 
     if ( !AreChildrenTransient() )
     {
+        const sal_uInt16 nColumnCount = GetColumnCount();
+
         // first call? -> initial list
         if ( m_aAccessibleChildren.empty() )
         {
-            sal_Int32 nCount = ( GetRowCount() + 1 ) * GetColumnCount();
+            sal_Int32 nCount = ( GetRowCount() + 1 ) * nColumnCount;
             m_aAccessibleChildren.assign( nCount, Reference< XAccessible >() );
         }
 
@@ -1021,8 +1023,9 @@ Reference< XAccessible > SvHeaderTabListBox::CreateAccessibleColumnHeader( sal_u
     // first call? -> initial list
     if ( m_aAccessibleChildren.empty() )
     {
-        sal_Int32 nCount = AreChildrenTransient() ? GetColumnCount()
-                                                  : ( GetRowCount() + 1 ) * GetColumnCount();
+        const sal_uInt16 nColumnCount = GetColumnCount();
+        sal_Int32 nCount = AreChildrenTransient() ? 
+                nColumnCount : ( GetRowCount() + 1 ) * nColumnCount;
         m_aAccessibleChildren.assign( nCount, Reference< XAccessible >() );
     }
 
@@ -1098,9 +1101,12 @@ sal_Bool SvHeaderTabListBox::ConvertPointToColumnHeader( sal_uInt16&, const Poin
             if ( _nPos >= 0 )
             {
                 sal_uInt16 nColumnCount = GetColumnCount();
-                sal_Int32 nRow = _nPos / nColumnCount;
-                sal_uInt16 nColumn  = static_cast< sal_uInt16 >( _nPos % nColumnCount );
-                aRetText = GetCellText( nRow, nColumn );
+                if (nColumnCount > 0)
+                {
+                    sal_Int32 nRow = _nPos / nColumnCount;
+                    sal_uInt16 nColumn  = static_cast< sal_uInt16 >( _nPos % nColumnCount );
+                    aRetText = GetCellText( nRow, nColumn );
+                }
             }
             break;
         }
@@ -1135,16 +1141,19 @@ sal_Bool SvHeaderTabListBox::ConvertPointToColumnHeader( sal_uInt16&, const Poin
         static const String sVar2( RTL_CONSTASCII_USTRINGPARAM( "%2" ) );
 
         sal_uInt16 nColumnCount = GetColumnCount();
-        sal_Int32 nRow = _nPos / nColumnCount;
-        sal_uInt16 nColumn  = static_cast< sal_uInt16 >( _nPos % nColumnCount );
-
-        String aText( SvtResId( STR_SVT_ACC_DESC_TABLISTBOX ) );
-        aText.SearchAndReplace( sVar1, String::CreateFromInt32( nRow ) );
-        String sColHeader = m_pImpl->m_pHeaderBar->GetItemText( m_pImpl->m_pHeaderBar->GetItemId( nColumn ) );
-        if ( sColHeader.Len() == 0 )
-            sColHeader = String::CreateFromInt32( nColumn );
-        aText.SearchAndReplace( sVar2, sColHeader );
-        aRetText = aText;
+        if (nColumnCount > 0)
+        {
+            sal_Int32 nRow = _nPos / nColumnCount;
+            sal_uInt16 nColumn  = static_cast< sal_uInt16 >( _nPos % nColumnCount );
+
+            String aText( SvtResId( STR_SVT_ACC_DESC_TABLISTBOX ) );
+            aText.SearchAndReplace( sVar1, String::CreateFromInt32( nRow ) );
+            String sColHeader = m_pImpl->m_pHeaderBar->GetItemText( m_pImpl->m_pHeaderBar->GetItemId( nColumn ) );
+            if ( sColHeader.Len() == 0 )
+                sColHeader = String::CreateFromInt32( nColumn );
+            aText.SearchAndReplace( sVar2, sColHeader );
+            aRetText = aText;
+        }
     }
 
     return aRetText;
commit 0eaff65d4568dc78c878be014b795d6bf3834e97
Author: Ivo Hinkelmann <ihi at openoffice.org>
Date:   Thu Jul 16 09:56:45 2009 +0000

    CWS-TOOLING: integrate CWS ooo311gsl05_DEV300
    2009-06-30 17:18:18 +0200 pl  r273524 : add patch flags for CWS ooo311gsl05
    2009-06-30 16:22:06 +0200 pl  r273519 : #i102485# correct landscape printing
    2009-06-30 08:45:25 +0200 hdu  r273486 : #i102378# fix PDF-export on PPC (thanks cloph!)

diff --git a/vcl/aqua/source/gdi/salprn.cxx b/vcl/aqua/source/gdi/salprn.cxx
index 422babf..48d2ad5 100644
--- a/vcl/aqua/source/gdi/salprn.cxx
+++ b/vcl/aqua/source/gdi/salprn.cxx
@@ -127,20 +127,27 @@ void AquaSalInfoPrinter::SetupPrinterGraphics( CGContextRef i_rContext ) const
             NSRect aImageRect = [mpPrintInfo imageablePageBounds];
             if( mePageOrientation == ORIENTATION_PORTRAIT )
             {
+                // move mirrored CTM back into paper
                 double dX = 0, dY = aPaperSize.height;
+                // move CTM to reflect imageable area
                 dX += aImageRect.origin.x;
                 dY -= aPaperSize.height - aImageRect.size.height - aImageRect.origin.y;
                 CGContextTranslateCTM( i_rContext, dX + mnStartPageOffsetX, dY - mnStartPageOffsetY );
+                // scale to be top/down and reflect our "virtual" DPI
                 CGContextScaleCTM( i_rContext, 0.1, -0.1 );
             }
             else
             {
+                // move CTM to reflect imageable area
+                double dX = aImageRect.origin.x, dY = aPaperSize.height - aImageRect.size.height - aImageRect.origin.y;
+                CGContextTranslateCTM( i_rContext, -dX, -dY );
+                // turn by 90 degree
                 CGContextRotateCTM( i_rContext, M_PI/2 );
-                double dX = aPaperSize.height, dY = -aPaperSize.width;
-                dY += aPaperSize.height - aImageRect.size.height - aImageRect.origin.y;
-                dX -= aImageRect.origin.x;
-
+                // move turned CTM back into paper
+                dX = aPaperSize.height;
+                dY = -aPaperSize.width;
                 CGContextTranslateCTM( i_rContext, dX + mnStartPageOffsetY, dY - mnStartPageOffsetX );
+                // scale to be top/down and reflect our "virtual" DPI
                 CGContextScaleCTM( i_rContext, -0.1, 0.1 );
             }
             mpGraphics->SetPrinterGraphics( i_rContext, nDPIX, nDPIY, 1.0 );


More information about the ooo-build-commit mailing list