INTEGRATION: CWS supdremove (1.93.28); FILE MERGED 2007/11/16 10:25:21 vg 1.93.28.1: #i83674# cleanup: remove obsolete SUPD macro use

--- sfx2/source/doc/objmisc.cxx
+++ sfx2/source/doc/objmisc.cxx
@@ -4,9 +4,9 @@
  *
  *  $RCSfile: objmisc.cxx,v $
  *
- *  $Revision: 1.94 $
+ *  $Revision: 1.95 $
  *
- *  last change: $Author: ihi $ $Date: 2007-11-21 16:47:33 $
+ *  last change: $Author: obo $ $Date: 2008-01-07 09:04:23 $
  *
  *  The Contents of this file are made available subject to
  *  the terms of GNU Lesser General Public License Version 2.1.
@@ -236,14 +236,6 @@

 //-------------------------------------------------------------------------

-#if SUPD<604
-void SfxObjectShell::NotifyReloadAvailable()
-{
-}
-#endif
-
-//-------------------------------------------------------------------------
-
 SfxDocumentInfo& SfxObjectShell::GetDocInfo()
 {
     if( !pImp->pDocInfo )


#101559# Added new export dialog behavior

--- sfx2/source/doc/objserv.cxx
+++ sfx2/source/doc/objserv.cxx
@@ -2,9 +2,9 @@
  *
  *  $RCSfile: objserv.cxx,v $
  *
- *  $Revision: 1.40 $
+ *  $Revision: 1.41 $
  *
- *  last change: $Author: mav $ $Date: 2002-07-31 11:49:10 $
+ *  last change: $Author: cd $ $Date: 2002-08-26 07:40:01 $
  *
  *  The Contents of this file are made available subject to the terms of
  *  either of the following licenses
@@ -68,6 +68,14 @@
 #include <com/sun/star/ui/dialogs/XFilePickerControlAccess.hpp>
 #endif

+#ifndef  _COM_SUN_STAR_UI_DIALOGS_COMMONFILEPICKERELEMENTIDS_HPP_
+#include <com/sun/star/ui/dialogs/CommonFilePickerElementIds.hpp>
+#endif
+
+#ifndef _COM_SUN_STAR_UI_DIALOGS_XCONTROLACCESS_HPP_
+#include <com/sun/star/ui/dialogs/XControlAccess.hpp>
+#endif
+
 #ifndef _COM_SUN_STAR_LANG_XMULTISERVICEFACTORY_HPP_
 #include <com/sun/star/lang/XMultiServiceFactory.hpp>
 #endif
@@ -171,6 +179,43 @@
 using namespace ::com::sun::star::document;

 //====================================================================
+// Helper class to initialize an export dialog for PDF
+
+class PDFExportFileDialog : public sfx2::FileDialogHelper
+{
+    public:
+        PDFExportFileDialog( const short nDialogType, sal_uInt32 nFlags ) :
+            sfx2::FileDialogHelper( nDialogType, nFlags ), m_bInitialized( sal_False ) {}
+
+        virtual void SAL_CALL DirectoryChanged( const ::com::sun::star::ui::dialogs::FilePickerEvent& aEvent );
+
+    private:
+        sal_Bool    m_bInitialized;
+};
+
+void SAL_CALL PDFExportFileDialog::DirectoryChanged( const ::com::sun::star::ui::dialogs::FilePickerEvent& aEvent )
+{
+    ::vos::OGuard aGuard( Application::GetSolarMutex() );
+
+    if ( !m_bInitialized )
+    {
+        m_bInitialized = sal_True;
+
+        Reference< ::com::sun::star::ui::dialogs::XFilePicker > xFilePicker = GetFilePicker();
+        Reference< ::com::sun::star::ui::dialogs::XFilePickerControlAccess > xControlAccess =
+            Reference< ::com::sun::star::ui::dialogs::XFilePickerControlAccess >( xFilePicker, UNO_QUERY );
+        if ( xControlAccess.is() )
+        {
+            String aExportButtonStr = String( SfxResId( STR_EXPORTWITHCFGBUTTON ));
+            ::rtl::OUString aStrExport = aExportButtonStr;
+            xControlAccess->setLabel( ::com::sun::star::ui::dialogs::CommonFilePickerElementIds::PUSHBUTTON_OK, aStrExport );
+        }
+    }
+
+    FileDialogHelper::DirectoryChanged( aEvent );
+}
+
+//====================================================================

 class SfxSaveAsContext_Impl
 {
@@ -318,21 +363,39 @@
     INetURLObject aURL;

     SFX_REQUEST_ARG( (*pRequest), pSaveToItem, SfxBoolItem, SID_SAVETO, sal_False );
+
     sal_Bool bSaveTo = pSaveToItem ? pSaveToItem->GetValue() : sal_False;
-    sal_Bool bIsExport = ( pRequest->GetSlot() == SID_EXPORTDOC );
-
+    sal_Bool bIsPDFExport = (( pRequest->GetSlot() == SID_EXPORTDOCASPDF ) ||
+                            ( pRequest->GetSlot() == SID_DIRECTEXPORTDOCASPDF ));
+    sal_Bool bIsExport = ( pRequest->GetSlot() == SID_EXPORTDOC ) || bIsPDFExport;
+    sal_Bool bSuppressFilterOptionsDialog = sal_False;
+
+    // Parameter to return if user cancelled a optional configuration dialog and
+    // there for cancelled the whole save procedure.
     DBG_ASSERT( !bIsExport || bSaveTo, "Export mode should use SaveTo mechanics!\n" );

-    sal_uInt16 nActFilt = 0;
-    const SfxFilter* pFilt;
-    for( pFilt = GetFactory().GetFilter( 0 );
-         pFilt && ( !pFilt->CanExport()
-                 || bIsExport && pFilt->CanImport() // Export case ( only for GUI )
-                 || !bSaveTo && !pFilt->CanImport() // SaveAs case
-                 || pFilt->IsInternal() );
-         pFilt = GetFactory().GetFilter( ++nActFilt ) );
-
-    DBG_ASSERT( pFilt, "Kein Filter zum Speichern" );
+    const SfxFilter* pFilt = NULL;
+    if ( pRequest->GetSlot() == SID_EXPORTDOCASPDF ||
+         pRequest->GetSlot() == SID_DIRECTEXPORTDOCASPDF )
+    {
+        // Preselect PDF-Filter for EXPORT
+        pFilt = GetFactory().GetFilterContainer()->GetFilter4Extension( String::CreateFromAscii( ".pdf" ), SFX_FILTER_EXPORT );
+        DBG_ASSERT( pFilt, "Kein Filter zum Speichern" );
+        if ( !pFilt )
+            return sal_False;
+    }
+    else
+    {
+        sal_uInt16 nActFilt = 0;
+        for( pFilt = GetFactory().GetFilter( 0 );
+            pFilt && ( !pFilt->CanExport()
+                    || bIsExport && pFilt->CanImport() // Export case ( only for GUI )
+                    || !bSaveTo && !pFilt->CanImport() // SaveAs case
+                    || pFilt->IsInternal() );
+            pFilt = GetFactory().GetFilter( ++nActFilt ) );
+
+        DBG_ASSERT( pFilt, "Kein Filter zum Speichern" );
+    }

     String aFilterName;
     if( pFilt )
@@ -423,8 +486,40 @@
                 aDialogFlags = SFXWB_EXPORT;
             }

-            sfx2::FileDialogHelper aFileDlg( aDialogMode, aDialogFlags, GetFactory(), nMust, nDont );
-            aFileDlg.CreateMatcher( GetFactory() );
+            sfx2::FileDialogHelper* pFileDlg = NULL;
+
+            if ( bIsPDFExport )
+            {
+                // Create file dialog for PDF export
+                pFileDlg = new PDFExportFileDialog( aDialogMode, aDialogFlags );
+                String aFilterExtension = pFilt->GetWildcard()();
+                String aFilterUIName = pFilt->GetUIName();
+                pFileDlg->AddFilter( aFilterUIName, aFilterExtension );
+                pFileDlg->SetTitle( String( SfxResId( STR_EXPORTASPDF_TITLE )) );
+                pFileDlg->SetDialogHelpId( HID_FILEDLG_EXPORTASPDF );
+                pFileDlg->CreateMatcher( GetFactory() );
+            }
+            else if ( bIsExport )
+            {
+                // This is the normal dialog
+                pFileDlg = new sfx2::FileDialogHelper( aDialogMode, aDialogFlags, GetFactory(), nMust, nDont );
+                pFileDlg->CreateMatcher( GetFactory() );
+                Reference< ::com::sun::star::ui::dialogs::XFilePicker > xFilePicker = pFileDlg->GetFilePicker();
+                Reference< ::com::sun::star::ui::dialogs::XFilePickerControlAccess > xControlAccess =
+                    Reference< ::com::sun::star::ui::dialogs::XFilePickerControlAccess >( xFilePicker, UNO_QUERY );
+                if ( xControlAccess.is() )
+                {
+                    String aExportButtonStr = String( SfxResId( STR_EXPORTBUTTON ));
+                    ::rtl::OUString aStrExport = aExportButtonStr;
+                    xControlAccess->setLabel( ::com::sun::star::ui::dialogs::CommonFilePickerElementIds::PUSHBUTTON_OK, aStrExport );
+                }
+            }
+            else
+            {
+                // This is the normal dialog
+                pFileDlg = new sfx2::FileDialogHelper( aDialogMode, aDialogFlags, GetFactory(), nMust, nDont );
+                pFileDlg->CreateMatcher( GetFactory() );
+            }

             if ( HasName() )
             {
@@ -445,30 +540,31 @@
                         aObj.setFinalSlash();
                         aObj = INetURLObject( aObj.RelToAbs( aPath, bWasAbsolute ) );
                         aObj.SetExtension( pFilt->GetDefaultExtension().Copy(2) );
-                        aFileDlg.SetDisplayDirectory( aObj.GetMainURL( INetURLObject::NO_DECODE ) );
+                        pFileDlg->SetDisplayDirectory( aObj.GetMainURL( INetURLObject::NO_DECODE ) );
                     }

-                    aFileDlg.SetCurrentFilter( pFilt->GetUIName() );
+                    pFileDlg->SetCurrentFilter( pFilt->GetUIName() );
                 }
                 else
                 {
                     if( aLastName.Len() )
-                        aFileDlg.SetDisplayDirectory( aLastName );
-                    aFileDlg.SetCurrentFilter( pMedFilter->GetUIName() );
+                        pFileDlg->SetDisplayDirectory( aLastName );
+                    pFileDlg->SetCurrentFilter( pMedFilter->GetUIName() );
                 }
             }
             else
             {
-                aFileDlg.SetDisplayDirectory( SvtPathOptions().GetWorkPath() );
+                pFileDlg->SetDisplayDirectory( SvtPathOptions().GetWorkPath() );
             }

             SFX_ITEMSET_ARG( GetMedium()->GetItemSet(), pPassItem, SfxStringItem, SID_PASSWORD, FALSE );
             sal_Bool bHadPass = ( pPassItem != NULL );

             SfxItemSet* pTempSet = NULL;
-            if ( aFileDlg.Execute( pTempSet, aFilterName, bHadPass ) != ERRCODE_NONE )
+            if ( pFileDlg->Execute( pTempSet, aFilterName, bHadPass ) != ERRCODE_NONE )
             {
                 SetError(ERRCODE_IO_ABORT);
+                delete pFileDlg;
                 return sal_False;
             }

@@ -479,7 +575,7 @@
                 pParams->Put( *pTempSet );

             // get the path from the dialog
-            aURL.SetURL( aFileDlg.GetPath() );
+            aURL.SetURL( pFileDlg->GetPath() );

             // gibt es schon ein Doc mit dem Namen?
             if ( aURL.GetProtocol() != INET_PROT_NOT_VALID )
@@ -500,6 +596,7 @@
                 {
                     // dann Fehlermeldeung: "schon offen"
                     SetError(ERRCODE_SFX_ALREADYOPEN);
+                    delete pFileDlg;
                     return sal_False;
                 }
             }
@@ -513,7 +610,7 @@
             }

             // --**-- pParams->Put( *pDlg->GetItemSet() );
-            Reference< XFilePickerControlAccess > xExtFileDlg( aFileDlg.GetFilePicker(), UNO_QUERY );
+            Reference< XFilePickerControlAccess > xExtFileDlg( pFileDlg->GetFilePicker(), UNO_QUERY );
             if ( xExtFileDlg.is() )
             {
                 try
@@ -557,6 +654,8 @@
                 }
                 catch( IllegalArgumentException ){}
             }
+
+            delete pFileDlg;
         }
         else
         {
@@ -656,7 +755,12 @@
     SfxMedium *pActMed = GetMedium();
     const INetURLObject aActName(pActMed->GetName());

-    if( bSaveTo || bUseFilterOptions )
+    // Don't show filter options dialog
+    if ( pRequest->GetSlot() == SID_DIRECTEXPORTDOCASPDF )
+        bSuppressFilterOptionsDialog = sal_True;
+
+    if( !bSuppressFilterOptionsDialog &&
+        ( bSaveTo || bUseFilterOptions ))
     {
         // call filter dialog
         if( xFilterCFG.is() )
@@ -699,7 +803,11 @@
                                                              NULL );
                                         pParams->Put( aNewParams );
                                     }
-                                    else return sal_True;   // cancel
+                                    else
+                                    {
+                                        SetError(ERRCODE_IO_ABORT);
+                                        return sal_False; // cancel
+                                    }
                                 }
                             }

@@ -710,7 +818,7 @@
             catch( NoSuchElementException& )
             {
                 // the filter name is unknown
-               SetError( ERRCODE_IO_INVALIDPARAMETER );
+                   SetError( ERRCODE_IO_INVALIDPARAMETER );
                 return sal_False;
             }
             catch( Exception& )
@@ -1063,6 +1171,8 @@
         // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

         case SID_EXPORTDOC:
+        case SID_EXPORTDOCASPDF:
+        case SID_DIRECTEXPORTDOCASPDF:
             rReq.AppendItem( SfxBoolItem( SID_SAVETO, sal_True ) );
             // another part is pretty the same as for SID_SAVEASDOC
         case SID_SAVEASURL:
@@ -1083,7 +1193,7 @@
                     SetError( ERRCODE_IO_INVALIDPARAMETER );
             }

-            BOOL bOk = GUISaveAs_Impl(nId == SID_SAVEASURL,  &rReq);
+            BOOL bOk = GUISaveAs_Impl(nId == SID_SAVEASURL, &rReq);
             ULONG lErr=GetErrorCode();
             if ( !lErr && !bOk )
                 lErr=ERRCODE_IO_GENERAL;
@@ -1098,8 +1208,17 @@
             if ( lErr!=ERRCODE_IO_ABORT )
                 ErrorHandler::HandleError(lErr);

+            if ( nId == SID_EXPORTDOCASPDF )
+            {
+                // This function is used by the SendMail function that needs information if a export
+                // file was written or not. This could be due to cancellation of the export
+                // or due to an error. So IO abort must be handled like an error!
+                bOk = ( lErr != ERRCODE_IO_ABORT ) & bOk;
+            }
+
+            rReq.SetReturnValue( SfxBoolItem(0, bOk) );
+
             ResetError();
-            rReq.SetReturnValue( SfxBoolItem(0, bOk) );

             Invalidate();
             break;
@@ -1523,6 +1642,22 @@
                 break;
             }

+            case SID_EXPORTDOCASPDF:
+            case SID_DIRECTEXPORTDOCASPDF:
+            {
+                SfxFactoryFilterContainer* pFilterContainer = GetFactory().GetFilterContainer();
+                if ( pFilterContainer )
+                {
+                    String aPDFExtension = String::CreateFromAscii( ".pdf" );
+                    const SfxFilter* pFilter = pFilterContainer->GetFilter4Extension( aPDFExtension, SFX_FILTER_EXPORT );
+                    if ( pFilter != NULL )
+                        break;
+                }
+
+                rSet.DisableItem( nWhich );
+                break;
+            }
+
             case SID_DOC_MODIFIED:
             {
                 rSet.Put( SfxStringItem( SID_DOC_MODIFIED, IsModified() ? '*' : ' ' ) );


Added feedback of pixel format chosen for read back

git-svn-id: 23b6355f2bb369032457de4eb5f713ee134f73a8@8343 16af8721-9629-0410-8352-f15c8da7e697

--- examples/osgscreencapture/osgscreencapture.cpp
+++ examples/osgscreencapture/osgscreencapture.cpp
@@ -67,8 +67,16 @@
             {
                 if (gc->getTraits())
                 {
-                    if (gc->getTraits()->alpha) _pixelFormat = GL_BGRA;
-                    else _pixelFormat = GL_BGR;
+                    if (gc->getTraits()->alpha)
+                    {
+                        osg::notify(osg::NOTICE)<<"Select GL_BGRA read back format"<<std::endl;
+                        _pixelFormat = GL_BGRA;
+                    }
+                    else
+                    {
+                        osg::notify(osg::NOTICE)<<"Select GL_BGR read back format"<<std::endl;
+                        _pixelFormat = GL_BGR;
+                    }
                 }

                 getSize(gc, _width, _height);
@@ -94,7 +102,7 @@
                         _pboBuffer.push_back(0);
                         break;
                     case(TRIPLE_PBO):
-                        osg::notify(osg::NOTICE)<<"Reading window usig glReadPixels, with a double buffer PixelBufferObject."<<std::endl;
+                        osg::notify(osg::NOTICE)<<"Reading window usig glReadPixels, with a triple buffer PixelBufferObject."<<std::endl;
                         _pboBuffer.push_back(0);
                         _pboBuffer.push_back(0);
                         _pboBuffer.push_back(0);


Ignore su3 files for now, support is comming.

--- Reseed.cpp
+++ Reseed.cpp
@@ -56,7 +56,7 @@
 			std::string routerInfo;
 			std::string tmpUrl;
 			std::string filename;
-			std::string ignoreFileSuffix = ".zip";
+			std::string ignoreFileSuffix = ".su3";
 			boost::filesystem::path root = i2p::util::filesystem::GetDataDir();
 			while (i != j)
 			{


Modified configuration file for xbox360 pad

--- summit_xl_pad/src/summit_xl_pad.cpp
+++ summit_xl_pad/src/summit_xl_pad.cpp
@@ -307,7 +307,7 @@
 		}else{
 			bRegisteredButtonEvent[speed_down_button_] = false;
 		 }
-
+		//ROS_ERROR("SummitXLPad::padCallback: Passed SPEED DOWN button %d", speed_down_button_);
 		if (joy->buttons[speed_up_button_] == 1){
 			if(!bRegisteredButtonEvent[speed_up_button_])
 				if(current_vel < 0.9){
@@ -323,12 +323,14 @@
 		}else{
 			bRegisteredButtonEvent[speed_up_button_] = false;
 		}
-
+		//ROS_ERROR("SummitXLPad::padCallback: Passed SPEED UP button %d", speed_up_button_);

 		vel.linear.x = current_vel*l_scale_*joy->axes[linear_x_];
 		vel.linear.y = current_vel*l_scale_*joy->axes[linear_y_];
+
+		//ROS_ERROR("SummitXLPad::padCallback: Passed linear axes");

 		if(joystick_dead_zone_=="true")
 		{
@@ -368,7 +370,7 @@
 			vel.linear.z = current_vel*l_scale_z_*joy->axes[linear_z_];
 		}

-
+		//ROS_ERROR("SummitXLPad::padCallback: Passed joystick deadzone ifelse");

@@ -408,6 +410,7 @@
 			bRegisteredButtonEvent[button_output_2_] = false;
 		}

+		//ROS_ERROR("SummitXLPad::padCallback: Passed LIGHTS");

 		// HOMING SERVICE
 		if (joy->buttons[button_home_] == 1) {
@@ -430,7 +433,9 @@
 		else {
 			bRegisteredButtonEvent[button_home_]=false;
 		}
-
+
+		//ROS_ERROR("SummitXLPad::padCallback: Passed HOME BUTTON");
+
 		// SPHERECAM
 		ptz.pan = ptz.tilt = ptz.zoom = 0.0;
 		ptz.relative = true;
@@ -479,6 +484,7 @@
 			}

 		}else{
+		  //ROS_ERROR("SummitXLPad::padCallback: INSIDE ELSE PTZ PAD_TYPE");
 		  // TILT-MOVEMENTS (RELATIVE POS)
 		  if (joy->buttons[ptz_tilt_up_] == 1) {
 		    if(!bRegisteredButtonEvent[ptz_tilt_up_]){
@@ -566,7 +572,7 @@
 			bRegisteredButtonEvent[button_kinematic_mode_] = false;
 		}

-
+		//ROS_ERROR("SummitXLPad::padCallback: Passed SPHERE CAM and KINEMATIC MODE");

 	}
    	else {


INTEGRATION: CWS custommeta (1.101.20); FILE MERGED 2008/01/29 12:54:56 mst 1.101.20.4: interface change: convertCommaSeparated - sfx2/inc/sfx2/docinf.hxx, sfx2/source/doc/docinf.cxx:   + remove functions convertCommaSeparated (moved to comphelper/string.hxx) - sfx2/source/doc/{objserv.cxx,objstor.cxx,objuno.cxx},   sfx2/source/dialog/dinfdlg.cxx,   sfx2/source/bastyp/{frmhtmlw.cxx,sfxhtml.cxx}:   + adapt to convertCommaSeparated change (moved to comphelper) 2008/01/25 16:13:43 mst 1.101.20.3: interface change: SfxObjectShell::GetDocInfo - sfx2/inc/sfx2/objsh.hxx, sfx2/source/inc/objshimp.hxx,   sfx2/source/doc/{objcont.cxx,objmisc.cxx,objserv.cxx,objxtor.cxx}:   + remove SfxDocumentInfo member   + remove method SfxObjectShell::GetDocInfo   + add method SfxObjectShell::getDocProperties   + use XDocumentProperties instead of SfxDocumentInfo   + adapt to new SfxDocumentInfoItem - sfx2/source/doc/sfxbasemodel.cxx:   + move creation of backup of document meta-data in case of     saveTo from SfxObjectShell::APISaveAs_Impl to SfxBaseModel::impl_store   + adapt to new SfxDocumentInfoItem 2008/01/16 15:34:09 mst 1.101.20.2: - sfx2/source/doc/objstor.cxx:   + refactor DoLoad to use XDocumentProperties instead of SfxDocumentInfo     to delay initialization of the latter 2007/12/18 18:00:54 mst 1.101.20.1: interface change: remove assignment operator of SfxDocumentInfo - sfx2/inc/sfx2/docinf.hxx, sfx2/source/doc/{docinf.cxx,objserv.cxx}:   + removed SfxDocumentInfo::operator= and operator==     the assignment operator cannot be implemented reliably anymore   + changed semantics of copy constructor!     now it creates a clone of the contained XDocumentInfo object

--- sfx2/source/doc/objserv.cxx
+++ sfx2/source/doc/objserv.cxx
@@ -4,9 +4,9 @@
  *
  *  $RCSfile: objserv.cxx,v $
  *
- *  $Revision: 1.101 $
+ *  $Revision: 1.102 $
  *
- *  last change: $Author: ihi $ $Date: 2007-11-21 16:47:51 $
+ *  last change: $Author: obo $ $Date: 2008-02-26 15:09:58 $
  *
  *  The Contents of this file are made available subject to
  *  the terms of GNU Lesser General Public License Version 2.1.
@@ -141,14 +141,12 @@
 #include <svtools/ehdl.hxx>
 #endif

+#include <comphelper/string.hxx>
 #include <basic/sbx.hxx>
 #include <svtools/pathoptions.hxx>
 #include <svtools/useroptions.hxx>
 #include <svtools/asynclink.hxx>
 #include <svtools/saveopt.hxx>
-
-#ifndef GCC
-#endif

 #include <sfx2/app.hxx>
 #include <sfx2/signaturestate.hxx>
@@ -160,7 +158,6 @@
 #include <sfx2/doctdlg.hxx>
 #include <sfx2/docfilt.hxx>
 #include <sfx2/docfile.hxx>
-#include <sfx2/docinf.hxx>
 #include <sfx2/dispatch.hxx>
 #include <sfx2/dinfdlg.hxx>
 #include <sfx2/objitem.hxx>
@@ -182,6 +179,10 @@
 #include "../appl/app.hrc"
 #include <com/sun/star/document/XDocumentSubStorageSupplier.hpp>
 #include <com/sun/star/embed/XTransactedObject.hpp>
+#include <com/sun/star/util/XCloneable.hpp>
+#include <com/sun/star/document/XDocumentInfo.hpp>
+#include <com/sun/star/document/XDocumentInfoSupplier.hpp>
+#include <com/sun/star/document/XDocumentProperties.hpp>

 #ifndef _SFX_HELPID_HRC
 #include "helpid.hrc"
@@ -387,9 +388,6 @@

     if ( GetMedium() )
     {
-        SFX_ITEMSET_ARG( aParams, pSaveToItem, SfxBoolItem, SID_SAVETO, sal_False );
-        sal_Bool bSaveTo = pSaveToItem && pSaveToItem->GetValue();
-
         String aFilterName;
         SFX_ITEMSET_ARG( aParams, pFilterNameItem, SfxStringItem, SID_FILTER_NAME, sal_False );
         if( pFilterNameItem )
@@ -423,30 +421,17 @@
         {
             SfxObjectShellRef xLock( this ); // ???

-            // since saving a document modified its DocumentInfo, the current DocumentInfo must be saved on "SaveTo", because
-            // it must be restored after saving
-            SfxDocumentInfo aSavedInfo;
-            sal_Bool bCopyTo =  bSaveTo || GetCreateMode() == SFX_CREATE_MODE_EMBEDDED;
-            if ( bCopyTo )
-                aSavedInfo = GetDocInfo();
-
             // use the title that is provided in the media descriptor
             SFX_ITEMSET_ARG( aParams, pDocTitleItem, SfxStringItem, SID_DOCINFO_TITLE, sal_False );
             if ( pDocTitleItem )
-                GetDocInfo().SetTitle( pDocTitleItem->GetValue() );
+                getDocProperties()->setTitle( pDocTitleItem->GetValue() );

             bOk = CommonSaveAs_Impl( INetURLObject(aFileName), aFilterName,
                 aParams );

-            if ( bCopyTo )
-            {
-                // restore DocumentInfo if only a copy was created
-                SfxDocumentInfo &rDocInfo = GetDocInfo();
-                rDocInfo = aSavedInfo;
-            }
-        }
-
-        // Picklisten-Eintrag verhindern
+        }
+
+        // prevent picklist-entry
         GetMedium()->SetUpdatePickList( FALSE );
     }

@@ -512,7 +497,10 @@
             if ( pDocInfItem )
             {
                 // parameter, e.g. from replayed macro
-                GetDocInfo() = (*pDocInfItem)();
+                uno::Reference<document::XDocumentInfoSupplier> xDIS(
+                    GetModel(), uno::UNO_QUERY_THROW);
+                pDocInfItem->updateDocumentInfo(getDocProperties(),
+                    xDIS->getDocumentInfo());
                 SetUseUserData( pDocInfItem->IsUseUserData() );
             }
             else
@@ -553,7 +541,10 @@
                     aTitle = GetTitle();
                 }

-                SfxDocumentInfoItem aDocInfoItem( aURL, GetDocInfo(), IsUseUserData() );
+                uno::Reference<document::XDocumentInfoSupplier> xDIS(
+                    GetModel(), uno::UNO_QUERY_THROW);
+                SfxDocumentInfoItem aDocInfoItem( aURL, getDocProperties(),
+                    xDIS->getDocumentInfo(), IsUseUserData() );
                 if ( !GetSlotState( SID_DOCTEMPLATE ) )
                     // templates not supported
                     aDocInfoItem.SetTemplate(FALSE);
@@ -574,11 +565,14 @@
                     if ( pDocInfoItem )
                     {
                         // user has done some changes to DocumentInfo
-                        GetDocInfo() = (*(const SfxDocumentInfoItem *)pDocInfoItem)();
+                        pDocInfoItem->updateDocumentInfo(getDocProperties(),
+                            xDIS->getDocumentInfo());
                         SetUseUserData( ((const SfxDocumentInfoItem *)pDocInfoItem)->IsUseUserData() );

                         // add data from dialog for possible recording purposes
-                        rReq.AppendItem( SfxDocumentInfoItem( GetTitle(), GetDocInfo(), IsUseUserData() ) );
+                        rReq.AppendItem( SfxDocumentInfoItem( GetTitle(),
+                            getDocProperties(), xDIS->getDocumentInfo(),
+                            IsUseUserData() ) );
                     }

                     rReq.Done();
@@ -1153,7 +1147,7 @@
             case SID_DOCINFO_TITLE:
             {
                 rSet.Put( SfxStringItem(
-                    SID_DOCINFO_TITLE, GetDocInfo().GetTitle() ) );
+                    SID_DOCINFO_TITLE, getDocProperties()->getTitle() ) );
                 break;
             }
             case SID_FILE_NAME:
@@ -1204,22 +1198,23 @@

         case SID_DOCINFO_AUTHOR :
         {
-            String aStr = ( (SfxStringItem&)rReq.GetArgs()->Get(rReq.GetSlot())).GetValue();
-            GetDocInfo().SetAuthor( aStr );
+            ::rtl::OUString aStr = ( (SfxStringItem&)rReq.GetArgs()->Get(rReq.GetSlot())).GetValue();
+            getDocProperties()->setAuthor( aStr );
             break;
         }

         case SID_DOCINFO_COMMENTS :
         {
-            String aStr = ( (SfxStringItem&)rReq.GetArgs()->Get(rReq.GetSlot())).GetValue();
-            GetDocInfo().SetComment( aStr );
+            ::rtl::OUString aStr = ( (SfxStringItem&)rReq.GetArgs()->Get(rReq.GetSlot())).GetValue();
+            getDocProperties()->setDescription( aStr );
             break;
         }

         case SID_DOCINFO_KEYWORDS :
         {
-            String aStr = ( (SfxStringItem&)rReq.GetArgs()->Get(rReq.GetSlot())).GetValue();
-            GetDocInfo().SetKeywords( aStr );
+            ::rtl::OUString aStr = ( (SfxStringItem&)rReq.GetArgs()->Get(rReq.GetSlot())).GetValue();
+            getDocProperties()->setKeywords(
+                ::comphelper::string::convertCommaSeparated(aStr) );
             break;
         }
     }
@@ -1236,21 +1231,22 @@
         {
             case SID_DOCINFO_AUTHOR :
             {
-                rSet.Put( SfxStringItem( nSID, GetDocInfo().GetAuthor() ) );
+                rSet.Put( SfxStringItem( nSID,
+                            getDocProperties()->getAuthor() ) );
                 break;
             }

             case SID_DOCINFO_COMMENTS :
             {
-                String aStr = GetDocInfo().GetComment();
-                rSet.Put( SfxStringItem( nSID, aStr ) );
+                rSet.Put( SfxStringItem( nSID,
+                            getDocProperties()->getDescription()) );
                 break;
             }

             case SID_DOCINFO_KEYWORDS :
             {
-                String aStr = GetDocInfo().GetKeywords();
-                rSet.Put( SfxStringItem( nSID, aStr ) );
+                rSet.Put( SfxStringItem( nSID, ::comphelper::string::
+                    convertCommaSeparated(getDocProperties()->getKeywords())) );
                 break;
             }


compressor filter: support selecting compressor to benchmark (#21282)

Signed-off-by: giantcroc <b9c0579bf8effc955a589e1c832018fc0b004f05@intel.com>

--- test/extensions/filters/http/compressor/compressor_filter_speed_test.cc
+++ test/extensions/filters/http/compressor/compressor_filter_speed_test.cc
@@ -223,43 +223,44 @@

 // SPELLCHECKER(off)
 /*
-Running ./bazel-bin/test/extensions/filters/http/common/compressor/compressor_filter_speed_test
-Run on (8 X 2300 MHz CPU s)
+You can sepcify "--benchmark_filter=Gzip" to select compressor to benchmark.
+Running ./bazel-bin/test/extensions/filters/http/compressor/compressor_filter_speed_test
+Run on (112 X 1784.9 MHz CPU s)
 CPU Caches:
-L1 Data 32K (x4)
-L1 Instruction 32K (x4)
-L2 Unified 262K (x4)
-L3 Unified 6291K (x1)
-Load Average: 1.82, 1.72, 1.74
+  L1 Data 48 KiB (x56)
+  L1 Instruction 32 KiB (x56)
+  L2 Unified 1280 KiB (x56)
+  L3 Unified 43008 KiB (x2)
+Load Average: 0.32, 0.52, 0.70
 ***WARNING*** Library was built as DEBUG. Timings may be affected.
-------------------------------------------------------------
-Benchmark                  Time             CPU   Iterations
-------------------------------------------------------------
-....
-compressFull/0/manual_time              14.1 ms         14.3 ms           48
-compressFull/1/manual_time              7.06 ms         7.22 ms          104
-compressFull/2/manual_time              5.17 ms         5.33 ms          123
-compressFull/3/manual_time              15.4 ms         15.5 ms           45
-compressFull/4/manual_time              10.1 ms         10.3 ms           69
-compressFull/5/manual_time              15.8 ms         16.0 ms           40
-compressFull/6/manual_time              15.3 ms         15.5 ms           42
-compressFull/7/manual_time              9.91 ms         10.1 ms           71
-compressFull/8/manual_time              15.8 ms         16.0 ms           45
-compressChunks16384/0/manual_time       13.4 ms         13.5 ms           52
-compressChunks16384/1/manual_time       6.33 ms         6.48 ms          111
-compressChunks16384/2/manual_time       5.09 ms         5.27 ms          147
-compressChunks16384/3/manual_time       15.1 ms         15.3 ms           46
-compressChunks16384/4/manual_time       9.61 ms         9.78 ms           71
-compressChunks16384/5/manual_time       14.5 ms         14.6 ms           47
-compressChunks16384/6/manual_time       14.0 ms         14.1 ms           48
-compressChunks16384/7/manual_time       9.20 ms         9.36 ms           76
-compressChunks16384/8/manual_time       14.5 ms         14.6 ms           48
-compressChunks8192/0/manual_time        14.3 ms         14.5 ms           50
-compressChunks8192/1/manual_time        6.80 ms         6.96 ms          100
-compressChunks8192/2/manual_time        5.21 ms         5.36 ms          135
-compressChunks8192/3/manual_time        14.9 ms         15.0 ms           47
-compressChunks8192/4/manual_time        9.71 ms         9.87 ms           68
-compressChunks8192/5/manual_time        15.9 ms         16.1 ms           45
+------------------------------------------------------------------------------------
+Benchmark                                          Time             CPU   Iterations
+------------------------------------------------------------------------------------
+compressFullWithGzip/0/manual_time              15.6 ms         16.2 ms           45
+compressFullWithGzip/1/manual_time              7.46 ms         8.01 ms           94
+compressFullWithGzip/2/manual_time              5.67 ms         6.22 ms          124
+compressFullWithGzip/3/manual_time              16.7 ms         17.3 ms           42
+compressFullWithGzip/4/manual_time              10.9 ms         11.4 ms           64
+compressFullWithGzip/5/manual_time              17.9 ms         18.5 ms           39
+compressFullWithGzip/6/manual_time              16.7 ms         17.2 ms           42
+compressFullWithGzip/7/manual_time              10.9 ms         11.4 ms           64
+compressFullWithGzip/8/manual_time              18.0 ms         18.5 ms           39
+compressChunks16384WithGzip/0/manual_time       14.6 ms         15.2 ms           47
+compressChunks16384WithGzip/1/manual_time       7.08 ms         7.65 ms           99
+compressChunks16384WithGzip/2/manual_time       5.49 ms         6.06 ms          127
+compressChunks16384WithGzip/3/manual_time       15.7 ms         16.3 ms           45
+compressChunks16384WithGzip/4/manual_time       10.3 ms         10.9 ms           68
+compressChunks16384WithGzip/5/manual_time       16.9 ms         17.4 ms           41
+compressChunks16384WithGzip/6/manual_time       15.7 ms         16.3 ms           44
+compressChunks16384WithGzip/7/manual_time       10.3 ms         10.9 ms           68
+compressChunks16384WithGzip/8/manual_time       16.8 ms         17.4 ms           41
+compressChunks8192WithGzip/0/manual_time        15.7 ms         16.3 ms           45
+compressChunks8192WithGzip/1/manual_time        7.56 ms         8.16 ms           93
+compressChunks8192WithGzip/2/manual_time        5.90 ms         6.51 ms          118
+compressChunks8192WithGzip/3/manual_time        16.9 ms         17.4 ms           42
+compressChunks8192WithGzip/4/manual_time        11.0 ms         11.6 ms           64
+compressChunks8192WithGzip/5/manual_time        18.2 ms         18.8 ms           38
+compressChunks8192WithGzip/6/manual_time        16.9 ms         17.5 ms           42
 ....
 */
 // SPELLCHECKER(on)


SfxChildWin_Impl::nVisibility is of type sal_uInt16/SVX_VISIBILITY_*

Change-Id: I4dd0556557ead72b2a2e9f45ccdb35a77efeab4d

--- sfx2/source/inc/workwin.hxx
+++ sfx2/source/inc/workwin.hxx
@@ -133,7 +133,7 @@
         pWin(0),
         bCreate(false),
         pCli(0),
-        nVisibility( sal_False ),
+        nVisibility( SFX_VISIBILITY_UNVISIBLE ),
         bEnable( true ),
         bDisabled( false )
     {}


INTEGRATION: CWS changefileheader (1.25.216); FILE MERGED 2008/04/01 15:39:41 thb 1.25.216.3: #i85898# Stripping all external header guards 2008/04/01 12:40:54 thb 1.25.216.2: #i85898# Stripping all external header guards 2008/03/31 13:38:39 rt 1.25.216.1: #i87441# Change license header to LPGL v3.

--- sfx2/source/view/orgmgr.cxx
+++ sfx2/source/view/orgmgr.cxx
@@ -1,50 +1,38 @@
 /*************************************************************************
  *
- *  OpenOffice.org - a multi-platform office productivity suite
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
- *  $RCSfile: orgmgr.cxx,v $
+ * Copyright 2008 by Sun Microsystems, Inc.
  *
- *  $Revision: 1.25 $
+ * OpenOffice.org - a multi-platform office productivity suite
  *
- *  last change: $Author: hr $ $Date: 2007-06-27 23:34:17 $
+ * $RCSfile: orgmgr.cxx,v $
+ * $Revision: 1.26 $
  *
- *  The Contents of this file are made available subject to
- *  the terms of GNU Lesser General Public License Version 2.1.
+ * This file is part of OpenOffice.org.
  *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
  *
- *    GNU Lesser General Public License Version 2.1
- *    =============================================
- *    Copyright 2005 by Sun Microsystems, Inc.
- *    901 San Antonio Road, Palo Alto, CA 94303, USA
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
  *
- *    This library is free software; you can redistribute it and/or
- *    modify it under the terms of the GNU Lesser General Public
- *    License version 2.1, as published by the Free Software Foundation.
- *
- *    This library is distributed in the hope that it will be useful,
- *    but WITHOUT ANY WARRANTY; without even the implied warranty of
- *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- *    Lesser General Public License for more details.
- *
- *    You should have received a copy of the GNU Lesser General Public
- *    License along with this library; if not, write to the Free Software
- *    Foundation, Inc., 59 Temple Place, Suite 330, Boston,
- *    MA  02111-1307  USA
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org.  If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
  *
  ************************************************************************/

 // MARKER(update_precomp.py): autogen include statement, do not remove
 #include "precompiled_sfx2.hxx"
-
-#ifndef _COM_SUN_STAR_EMBED_XSTORAGE_HPP_
 #include <com/sun/star/embed/XStorage.hpp>
-#endif
-#ifndef _COM_SUN_STAR_EMBED_XTRANSACTEDOBJECT_HPP_
 #include <com/sun/star/embed/XTransactedObject.hpp>
-#endif
-#ifndef _COM_SUN_STAR_EMBED_ELEMENTMODES_HPP_
 #include <com/sun/star/embed/ElementModes.hpp>
-#endif

 #ifndef _MSGBOX_HXX //autogen
 #include <vcl/msgbox.hxx>
@@ -56,9 +44,7 @@
 #ifndef _UNOTOOLS_PROCESSFACTORY_HXX
 #include <comphelper/processfactory.hxx>
 #endif
-#ifndef _UNOTOOLS_INTLWRAPPER_HXX
 #include <unotools/intlwrapper.hxx>
-#endif

 #include <comphelper/storagehelper.hxx>


Make sure to store the state of the crypto actions when saving a mail to
drafts, but only if the state of the mail itself should not be used as
indication of the state of the actions. This is governd by the option
to "never sign and encrypt when saving to drafts" in the security
settings.

Prokde35-z item 44.
BUG: 103240

svn path=/branches/kdepim/enterprise/kdepim/; revision=702320

--- kmail/kmcomposewin.cpp
+++ kmail/kmcomposewin.cpp
@@ -1834,6 +1834,10 @@
     default: // nothing
       break;
   }
+
+  // if these headers are present, the state of the message should be overruled
+  mLastSignActionState = (mMsg->headerField( "X-KMail-SignatureActionEnabled" ) == "true");
+  mLastEncryptActionState = (mMsg->headerField( "X-KMail-EncryptActionEnabled" ) == "true");

   mLastIdentityHasSigningKey = !ident.pgpSigningKey().isEmpty() || !ident.smimeSigningKey().isEmpty();
   mLastIdentityHasEncryptionKey = !ident.pgpEncryptionKey().isEmpty() || !ident.smimeEncryptionKey().isEmpty();
@@ -4010,6 +4014,17 @@
     }
   }

+  if (neverEncrypt && saveIn != KMComposeWin::None ) {
+      // we can't use the state of the mail itself, to remember the
+      // signing and encryption state, so let's add a header instead
+    mMsg->setHeaderField( "X-KMail-SignatureActionEnabled", mSignAction->isChecked()? "true":"false" );
+    mMsg->setHeaderField( "X-KMail-EncryptActionEnabled", mEncryptAction->isChecked()? "true":"false"  );
+  } else {
+    mMsg->removeHeaderField( "X-KMail-SignatureActionEnabled" );
+    mMsg->removeHeaderField( "X-KMail-EncryptActionEnabled" );
+  }
+
+
   kdDebug(5006) << "KMComposeWin::doSend() - calling applyChanges()"
                 << endl;
   applyChanges( neverEncrypt );


INTEGRATION: CWS filtercfg (1.52.6); FILE MERGED 2004/01/13 19:53:24 as 1.52.6.3: RESYNC: (1.53-1.54); FILE MERGED 2003/12/08 09:09:57 as 1.52.6.2: RESYNC: (1.52-1.53); FILE MERGED correct merge conflict 2003/10/30 16:37:55 mba 1.52.6.1: #102620#: create SfxFilters on demand; #112342#: avoid GPF under strange circumstances

--- sfx2/source/view/topfrm.cxx
+++ sfx2/source/view/topfrm.cxx
@@ -2,9 +2,9 @@
  *
  *  $RCSfile: topfrm.cxx,v $
  *
- *  $Revision: 1.54 $
- *
- *  last change: $Author: vg $ $Date: 2004-01-06 16:38:40 $
+ *  $Revision: 1.55 $
+ *
+ *  last change: $Author: kz $ $Date: 2004-01-28 19:15:56 $
  *
  *  The Contents of this file are made available subject to the terms of
  *  either of the following licenses
@@ -970,15 +970,12 @@
     DBG_CHKTHIS(SfxTopViewFrame, 0);

     const SfxObjectFactory &rFact = GetObjectShell()->GetFactory();
-    if ( rFact.GetFilterContainer()->GetFilterCount() )
-    {
-        pImp->aFactoryName = String::CreateFromAscii( rFact.GetShortName() );
-        USHORT nSlotId = rFact.GetCreateNewSlotId();
-        if ( nSlotId )
-        {
-            pImp->aFactoryName += String::CreateFromAscii("?slot=");
-            pImp->aFactoryName += String::CreateFromInt32( (sal_Int32) nSlotId );
-        }
+    pImp->aFactoryName = String::CreateFromAscii( rFact.GetShortName() );
+    USHORT nSlotId = rFact.GetCreateNewSlotId();
+    if ( nSlotId )
+    {
+        pImp->aFactoryName += String::CreateFromAscii("?slot=");
+        pImp->aFactoryName += String::CreateFromInt32( (sal_Int32) nSlotId );
     }

     String aTitle = SfxViewFrame::UpdateTitle();


Update function pointers when importing.

--- src/IR.cpp
+++ src/IR.cpp
@@ -43,6 +43,7 @@
     CallGraph cg = cgb.build(m);

     std::set<Name> to_link = find.functions();
+    std::map<Name, Function *> linked;
     for (std::set<Name>::iterator I = to_link.begin(), E = to_link.end(); I != E; ++I) {
         const Name &name = *I;
         // FindCallsToModule only compares function names to allow the
@@ -56,27 +57,47 @@
         assert(f->name.namespace_id.empty());
         f->name.namespace_id = m->namespace_id;
         add_function(f);
+        linked[f->name] = f;
         // Make sure to pull in functions that f calls as well.
         std::vector<Function *> calls = cg.transitive_calls(f);
         for (std::vector<Function *>::iterator CI = calls.begin(), CE = calls.end(); CI != CE; ++CI) {
             f = *CI;
             // Avoid dummy functions and duplicates.
             if (f->body == NULL || to_link.count(f->name)) continue;
-            assert(f->name.namespace_id.empty());
+            //assert(f->name.namespace_id.empty());
             f->name.namespace_id = m->namespace_id;
             add_function(f);
+            linked[f->name] = f;
         }
     }

-    // Special case for standard library functions: fix up the
-    // function call namespaces. This is so that the user does not
-    // have to write, for example, "Stdlib.assert()" in order to call
-    // the standard library assert function.
-    if (m->path == get_stdlib_path()) {
-        std::vector<FunctionCall *> calls = find.function_calls();
-        for (std::vector<FunctionCall *>::iterator I = calls.begin(), E = calls.end(); I != E; ++I) {
-            FunctionCall *call = *I;
+    // Now patch up the function pointers, replacing the "dummy"
+    // functions inserted at parse time with the real functions from
+    // the imported module.
+    std::vector<FunctionCall *> calls = find.function_calls();
+    std::set<Function *> to_erase;
+    for (std::vector<FunctionCall *>::iterator I = calls.begin(), E = calls.end(); I != E; ++I) {
+        FunctionCall *call = *I;
+        Name name = call->function->name;
+        // Special case for stdlib functions: they can be called
+        // without a namespace, so add it here.
+        if (m->path == get_stdlib_path()) {
             call->function->name.namespace_id = "StdLib";
+        }
+        if (linked.find(name) != linked.end()) {
+            assert(call->function->body == NULL);
+            to_erase.insert(call->function);
+            call->function = linked[name];
+        }
+    }
+
+    // Finally, erase the old dummy functions.
+    for (std::vector<Function *>::iterator I = functions.begin(), E = functions.end(); I != E; ) {
+        if (to_erase.find(*I) != to_erase.end()) {
+            delete *I;
+            I = functions.erase(I);
+        } else {
+            ++I;
         }
     }
 }


INTEGRATION: CWS ooo19126 (1.4.222); FILE MERGED 2005/09/05 12:58:31 rt 1.4.222.1: #i54170# Change license header: remove SISSL

--- extensions/source/abpilot/admininvokationpage.cxx
+++ extensions/source/abpilot/admininvokationpage.cxx
@@ -1,61 +1,35 @@
 /*************************************************************************
+ *
+ *  OpenOffice.org - a multi-platform office productivity suite
  *
  *  $RCSfile: admininvokationpage.cxx,v $
  *
- *  $Revision: 1.4 $
+ *  $Revision: 1.5 $
  *
- *  last change: $Author: hr $ $Date: 2004-08-02 17:36:08 $
+ *  last change: $Author: rt $ $Date: 2005-09-08 19:05:47 $
  *
- *  The Contents of this file are made available subject to the terms of
- *  either of the following licenses
- *
- *         - GNU Lesser General Public License Version 2.1
- *         - Sun Industry Standards Source License Version 1.1
- *
- *  Sun Microsystems Inc., October, 2000
- *
- *  GNU Lesser General Public License Version 2.1
- *  =============================================
- *  Copyright 2000 by Sun Microsystems, Inc.
- *  901 San Antonio Road, Palo Alto, CA 94303, USA
- *
- *  This library is free software; you can redistribute it and/or
- *  modify it under the terms of the GNU Lesser General Public
- *  License version 2.1, as published by the Free Software Foundation.
- *
- *  This library is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- *  Lesser General Public License for more details.
- *
- *  You should have received a copy of the GNU Lesser General Public
- *  License along with this library; if not, write to the Free Software
- *  Foundation, Inc., 59 Temple Place, Suite 330, Boston,
- *  MA  02111-1307  USA
+ *  The Contents of this file are made available subject to
+ *  the terms of GNU Lesser General Public License Version 2.1.
  *
  *
- *  Sun Industry Standards Source License Version 1.1
- *  =================================================
- *  The contents of this file are subject to the Sun Industry Standards
- *  Source License Version 1.1 (the "License"); You may not use this file
- *  except in compliance with the License. You may obtain a copy of the
- *  License at http://www.openoffice.org/license.html.
+ *    GNU Lesser General Public License Version 2.1
+ *    =============================================
+ *    Copyright 2005 by Sun Microsystems, Inc.
+ *    901 San Antonio Road, Palo Alto, CA 94303, USA
  *
- *  Software provided under this License is provided on an "AS IS" basis,
- *  WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING,
- *  WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
- *  MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
- *  See the License for the specific provisions governing your rights and
- *  obligations concerning the Software.
+ *    This library is free software; you can redistribute it and/or
+ *    modify it under the terms of the GNU Lesser General Public
+ *    License version 2.1, as published by the Free Software Foundation.
  *
- *  The Initial Developer of the Original Code is: Sun Microsystems, Inc..
+ *    This library is distributed in the hope that it will be useful,
+ *    but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ *    Lesser General Public License for more details.
  *
- *  Copyright: 2000 by Sun Microsystems, Inc.
- *
- *  All Rights Reserved.
- *
- *  Contributor(s): _______________________________________
- *
+ *    You should have received a copy of the GNU Lesser General Public
+ *    License along with this library; if not, write to the Free Software
+ *    Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ *    MA  02111-1307  USA
  *
  ************************************************************************/


Fix a crash when syncing flags from a server while we have a search folder
that has a search rule which needs the complete body, because this unget()s
the message behind our back right after changing the flags.

BUG: 106030

svn path=/trunk/KDE/kdepim/; revision=900449

--- kmail/kmfolderimap.cpp
+++ kmail/kmfolderimap.cpp
@@ -1473,7 +1473,19 @@
       continue;
     }
     if ( ((flags & imapFlagMap[i].imapFlag) > 0) != (oldStatus & imapFlagMap[i].kmFlag) ) {
+
+      // The call to toggleStatus() emits a signal that the header has changed,
+      // which causes search folders to update. If the search folder has a rule
+      // that needs the complete body, it will unget() the message and invalidate
+      // out msg pointer. Therefore, save the index of the message before calling
+      // toggleStatus(), and get a valid msg pointer afterwards.
+      KMFolderIndex *storage = msg->storage();
+      int oldIndex = -1;
+      if ( storage )
+        oldIndex = storage->find( msg );
       msg->toggleStatus( imapFlagMap[i].kmFlag );
+      if ( storage )
+        msg = storage->getMsg( oldIndex );
     }
   }


TransformOnActivate for objects in old file format

--- sfx2/source/view/viewsh.cxx
+++ sfx2/source/view/viewsh.cxx
@@ -2,9 +2,9 @@
  *
  *  $RCSfile: viewsh.cxx,v $
  *
- *  $Revision: 1.10 $
- *
- *  last change: $Author: pb $ $Date: 2001-02-09 13:45:26 $
+ *  $Revision: 1.11 $
+ *
+ *  last change: $Author: mba $ $Date: 2001-03-19 09:23:59 $
  *
  *  The Contents of this file are made available subject to the terms of
  *  either of the following licenses
@@ -439,6 +439,10 @@

     // und ab gehts (kein SetModified rufen, das mach das Obj schon selbst)
     SfxErrorContext aEc( ERRCTX_SO_DOVERB, GetWindow(), RID_SO_ERRCTX );
+    SvPersist* pPersist = GetObjectShell()->GetInPlaceObject();
+    if ( !pPersist )
+        pPersist = GetObjectShell();
+    pPersist->StartActivation( pIPClient->GetEmbedObj() );
     ErrCode nErr = pIPClient->GetEmbedObj()->DoVerb( nVerb );
     if( nErr )
         ErrorHandler::HandleError( nErr );


Related fdo#46808: Improve previous commit slightly

Change-Id: I95da6e3082a3ebd0bebabf233497ae40d6398fdd

--- extensions/source/nsplugin/source/so_instance.cxx
+++ extensions/source/nsplugin/source/so_instance.cxx
@@ -32,7 +32,6 @@
 #include <com/sun/star/frame/XDispatchProviderInterception.hpp>
 #include <com/sun/star/lang/SystemDependent.hpp>
 #include <com/sun/star/awt/Toolkit.hpp>
-#include <com/sun/star/awt/XSystemChildFactory.hpp>
 #include <com/sun/star/awt/XVclWindowPeer.hpp>
 #include <com/sun/star/util/XCloseable.hpp>
 #include <com/sun/star/lang/DisposedException.hpp>
@@ -137,7 +136,7 @@
         Reference< uno::XComponentContext > xContext( xFactoryProperties->getPropertyValue( "DefaultContext" ), UNO_QUERY );

         // try to create netscape plugin window
-        Reference< awt::XToolkit > xToolkit( awt::Toolkit::create(xContext), uno::UNO_QUERY_THROW );
+        Reference< awt::XToolkit2 > xToolkit( awt::Toolkit::create(xContext) );

         // prepare parameters for plugin window
         css::uno::Any hwndParent = css::uno::makeAny((sal_Int32)hParent);
@@ -148,18 +147,11 @@
         sal_Int16 nWindowType = css::lang::SystemDependent::SYSTEM_WIN32;
 #endif //end of WNT

-        Reference< awt::XSystemChildFactory > xToolkitSystemChildFactory(xToolkit, uno::UNO_QUERY);
-        if (!xToolkitSystemChildFactory.is())
-        {
-            debug_fprintf(NSP_LOG_APPEND, "print by Nsplugin, get xToolkitSystemChildFactory failure.\n");
-            return sal_False;
-        }
-
         debug_fprintf(NSP_LOG_APPEND, "print by Nsplugin,  try to create plugin container window HWIN:%ld.\n", hParent);

         // create the plugin window
         Reference< awt::XWindowPeer > xNewWinPeer =
-            xToolkitSystemChildFactory->createSystemChild( hwndParent,
+            xToolkit->createSystemChild( hwndParent,
                 css::uno::Sequence<sal_Int8>(), nWindowType );
         if ( !xNewWinPeer.is() )
         {


forward port SVN commit 530024 by burghard:

Init variable, as posted on kde-pim

svn path=/trunk/KDE/kdepim/; revision=531698

--- kmail/kmfolderimap.cpp
+++ kmail/kmfolderimap.cpp
@@ -1100,17 +1100,20 @@
     int a = cstr.find("X-uidValidity: ");
     int b = cstr.find("\r\n", a);
     QString uidv;
-    if ( (b - a - 15) >= 0 ) uidv = cstr.mid(a + 15, b - a - 15);
+    if ( (b - a - 15) >= 0 )
+      uidv = cstr.mid(a + 15, b - a - 15);
     a = cstr.find("X-Access: ");
     b = cstr.find("\r\n", a);
     QString access;
-    if ( (b - a - 10) >= 0 ) access = cstr.mid(a + 10, b - a - 10);
+    if ( (b - a - 10) >= 0 )
+      access = cstr.mid(a + 10, b - a - 10);
     mReadOnly = access == "Read only";
     a = cstr.find("X-Count: ");
     b = cstr.find("\r\n", a);
     int exists = -1;
-    bool ok;
-    if ( (b - a - 9) >= 0 ) exists = cstr.mid(a + 9, b - a - 9).toInt(&ok);
+    bool ok = false;
+    if ( (b - a - 9) >= 0 )
+      exists = cstr.mid(a + 9, b - a - 9).toInt(&ok);
     if ( !ok ) exists = -1;
     QString startUid;
     if (uidValidity() != uidv)


succesfully -> successfully

succesfully -> successfully

svn path=/trunk/KDE/kdepim/; revision=884955

--- kmail/kmmainwidget.cpp
+++ kmail/kmmainwidget.cpp
@@ -1758,9 +1758,9 @@
   if ( command->result() != KMCommand::OK )
   {
     if ( moveWasReallyADelete )
-      BroadcastStatus::instance()->setStatusMsg( i18n( "Messages deleted succesfully." ) );
+      BroadcastStatus::instance()->setStatusMsg( i18n( "Messages deleted successfully." ) );
     else
-      BroadcastStatus::instance()->setStatusMsg( i18n( "Messages moved succesfully." ) );
+      BroadcastStatus::instance()->setStatusMsg( i18n( "Messages moved successfully." ) );
   } else {
     if ( moveWasReallyADelete )
     {
@@ -1909,7 +1909,7 @@

   if ( command->result() != KMCommand::OK )
   {
-    BroadcastStatus::instance()->setStatusMsg( i18n( "Messages copied succesfully." ) );
+    BroadcastStatus::instance()->setStatusMsg( i18n( "Messages copied successfully." ) );
   } else {
     if ( command->result() == KMCommand::Failed )
       BroadcastStatus::instance()->setStatusMsg( i18n( "Copying messages failed." ) );
@@ -2040,7 +2040,7 @@

   if ( command->result() != KMCommand::OK )
   {
-    BroadcastStatus::instance()->setStatusMsg( i18n( "Messages moved to trash succesfully." ) );
+    BroadcastStatus::instance()->setStatusMsg( i18n( "Messages moved to trash successfully." ) );
   } else {
     if ( command->result() == KMCommand::Failed )
       BroadcastStatus::instance()->setStatusMsg( i18n( "Moving messages to trash failed." ) );


Fix a bug where the refreshOrStopButton will be shown on startup.

--- marketorderswidget.cpp
+++ marketorderswidget.cpp
@@ -31,6 +31,7 @@
   refreshOrStopButton = new QPushButton();
   setButtonState(RefreshState);
   ui->tabs->setCornerWidget(refreshOrStopButton);
+  refreshOrStopButton->hide();

   typeId = -1;
   connect(ui->typePixmapLabel, SIGNAL(typeDropped(int)),


add AKONADI_VALGRIND_OPTIONS to specify additional options (besides the skin used) for valgrind

svn path=/trunk/kdesupport/akonadi/; revision=949242

--- server/control/processcontrol.cpp
+++ server/control/processcontrol.cpp
@@ -124,24 +124,38 @@
   }
 }

+namespace {
+  static QString getEnv( const char* name, const QString& defaultValue=QString() ) {
+    const QString v = QString::fromLocal8Bit( qgetenv( "AKONADI_VALGRIND_SKIN" ) );
+    return !v.isEmpty() ? v : defaultValue;
+  }
+}
+
 void ProcessControl::start()
 {
 #ifdef Q_OS_UNIX
-  QString agentValgrind = QString::fromLocal8Bit( qgetenv("AKONADI_VALGRIND") );
+  QString agentValgrind = getEnv( "AKONADI_VALGRIND" );
   if ( !agentValgrind.isEmpty() && mApplication.contains( agentValgrind ) ) {
+
+    mArguments.prepend( mApplication );
+    mApplication = QString::fromLocal8Bit( "valgrind" );
+
+    const QString valgrindSkin = getEnv( "AKONADI_VALGRIND_SKIN", QString::fromLocal8Bit( "memcheck" ) );
+    mArguments.prepend( QLatin1String( "--tool=" ) + valgrindSkin );
+
+    const QString valgrindOptions = getEnv( "AKONADI_VALGRIND_OPTIONS" );
+    if ( !valgrindOptions.isEmpty() )
+      mArguments.prepend( valgrindOptions );
+
     qDebug();
     qDebug() << "============================================================";
     qDebug() << "ProcessControl: Valgrinding process" << mApplication;
+    if ( !valgrindSkin.isEmpty() )
+      qDebug() << "ProcessControl: Valgrind skin:" << valgrindSkin;
+    if ( !valgrindOptions.isEmpty() )
+      qDebug() << "ProcessControl: Additional Valgrind options:" << valgrindOptions;
     qDebug() << "============================================================";
     qDebug();
-    QString valgrindSkin = QString::fromLocal8Bit( qgetenv( "AKONADI_VALGRIND_SKIN" ) );
-
-    mArguments.prepend( mApplication );
-    mApplication = QString::fromLocal8Bit( "valgrind" );
-    if ( !valgrindSkin.isEmpty() )
-      mArguments.prepend( QLatin1String( "--tool=" ) + valgrindSkin );
-    else
-      mArguments.prepend (QLatin1String( "--tool=memcheck") );
   }
 #endif


INTEGRATION: CWS sb59 (1.4.192); FILE MERGED 2006/08/22 12:58:29 sb 1.4.192.1: #i67487# Made code warning-free (wntmsci10).

--- filter/source/xsltdialog/xmlfiltertabpagexslt.cxx
+++ filter/source/xsltdialog/xmlfiltertabpagexslt.cxx
@@ -4,9 +4,9 @@
  *
  *  $RCSfile: xmlfiltertabpagexslt.cxx,v $
  *
- *  $Revision: 1.5 $
- *
- *  last change: $Author: obo $ $Date: 2006-09-17 07:49:14 $
+ *  $Revision: 1.6 $
+ *
+ *  last change: $Author: obo $ $Date: 2006-10-12 13:45:02 $
  *
  *  The Contents of this file are made available subject to
  *  the terms of GNU Lesser General Public License Version 2.1.
@@ -39,6 +39,8 @@
 #ifndef _COM_SUN_STAR_FRAME_XCONFIGMANAGER_HPP_
 #include <com/sun/star/frame/XConfigManager.hpp>
 #endif
+
+#include "com/sun/star/ui/dialogs/TemplateDescription.hpp"

 #ifndef _FILEDLGHELPER_HXX
 #include <sfx2/filedlghelper.hxx>
@@ -225,7 +227,8 @@
     }

     // Open Fileopen-Dialog
-       ::sfx2::FileDialogHelper aDlg( ::sfx2::FILEOPEN_SIMPLE, 0 );
+       ::sfx2::FileDialogHelper aDlg(
+        com::sun::star::ui::dialogs::TemplateDescription::FILEOPEN_SIMPLE, 0 );

     aDlg.SetDisplayDirectory( GetURL( *pURLBox ) );


properties

properties

--- lualite.hpp
+++ lualite.hpp
@@ -438,10 +438,6 @@
   // metatable
   lua_createtable(L, 0, 1);

-  bool has_gc(false);
-  bool has_index(false);
-  bool has_newindex(false);
-
   mi_ptr = *cmi_ptr->firstmetadef;

   while (mi_ptr)
@@ -453,28 +449,10 @@

     lua_setfield(L, -2, mi_ptr->name);

-    if (!has_gc)
-    {
-      has_gc = !std::strcmp("__gc", mi_ptr->name);
-    }
-    // else do nothing
-
-    if (!has_index)
-    {
-      has_index = !std::strcmp("__index", mi_ptr->name);
-    }
-    // else do nothing
-
-    if (!has_newindex)
-    {
-      has_newindex = !std::strcmp("__newindex", mi_ptr->name);
-    }
-    // else do nothing
-
     mi_ptr = mi_ptr->next;
   }

-  if (!has_gc)
+  if (!lualite::class_<C>::has_gc)
   {
     assert(lua_istable(L, -1));

@@ -485,7 +463,7 @@
   }
   // else do nothing

-  if (!has_index)
+  if (!lualite::class_<C>::has_index)
   {
     assert(lua_istable(L, -1));
     lua_pushlightuserdata(L, instance);
@@ -495,7 +473,7 @@
   }
   // else do nothing

-  if (!has_newindex)
+  if (!lualite::class_<C>::has_newindex)
   {
     assert(lua_istable(L, -1));
     lua_pushlightuserdata(L, instance);
@@ -651,9 +629,6 @@
   // metatable
   lua_createtable(L, 0, 1);

-  bool has_index(false);
-  bool has_newindex(false);
-
   mi_ptr = *cmi_ptr->firstmetadef;

   while (mi_ptr)
@@ -669,22 +644,10 @@
     }
     // else do nothing

-    if (!has_index)
-    {
-      has_index = !std::strcmp("__index", mi_ptr->name);
-    }
-    // else do nothing
-
-    if (!has_newindex)
-    {
-      has_newindex = !std::strcmp("__newindex", mi_ptr->name);
-    }
-    // else do nothing
-
     mi_ptr = mi_ptr->next;
   }

-  if (!has_index)
+  if (!lualite::class_<C>::has_index)
   {
     assert(lua_istable(L, -1));
     lua_pushlightuserdata(L, instance);
@@ -694,7 +657,7 @@
   }
   // else do nothing

-  if (!has_newindex)
+  if (!lualite::class_<C>::has_newindex)
   {
     assert(lua_istable(L, -1));
     lua_pushlightuserdata(L, instance);
@@ -1230,6 +1193,24 @@
   template <class R, class ...A>
   class_& metadef(char const* const name, R (C::*ptr_to_member)(A...) const)
   {
+    if (!has_gc)
+    {
+      has_gc = !std::strcmp("__gc", name);
+    }
+    // else do nothing
+
+    if (!has_index)
+    {
+      has_index = !std::strcmp("__index", name);
+    }
+    // else do nothing
+
+    if (!has_newindex)
+    {
+      has_newindex = !std::strcmp("__newindex", name);
+    }
+    // else do nothing
+
     const_member_function(firstmetadef_, lastmetadef_, name, ptr_to_member);
     return *this;
   }
@@ -1306,6 +1287,11 @@
     setters_.emplace(name, detail::member_stub<&mmib, 3, C, RB, B...>);
     return *this;
   }
+
+public:
+  static bool has_gc;
+  static bool has_index;
+  static bool has_newindex;

 private:
   detail::func_info_type constructors_;
@@ -1324,6 +1310,15 @@
 };

 template <class C>
+bool class_<C>::has_gc;
+
+template <class C>
+bool class_<C>::has_index;
+
+template <class C>
+bool class_<C>::has_newindex;
+
+template <class C>
 detail::member_info_type* class_<C>::firstdef_;

 template <class C>


INTEGRATION: CWS changefileheader (1.6.26); FILE MERGED 2008/04/01 15:44:24 thb 1.6.26.3: #i85898# Stripping all external header guards 2008/04/01 12:43:09 thb 1.6.26.2: #i85898# Stripping all external header guards 2008/03/31 13:00:56 rt 1.6.26.1: #i87441# Change license header to LPGL v3.

--- svtools/inc/statusbarcontroller.hxx
+++ svtools/inc/statusbarcontroller.hxx
@@ -1,92 +1,49 @@
 /*************************************************************************
  *
- *  OpenOffice.org - a multi-platform office productivity suite
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
- *  $RCSfile: statusbarcontroller.hxx,v $
+ * Copyright 2008 by Sun Microsystems, Inc.
  *
- *  $Revision: 1.6 $
+ * OpenOffice.org - a multi-platform office productivity suite
  *
- *  last change: $Author: kz $ $Date: 2008-03-07 14:34:07 $
+ * $RCSfile: statusbarcontroller.hxx,v $
+ * $Revision: 1.7 $
  *
- *  The Contents of this file are made available subject to
- *  the terms of GNU Lesser General Public License Version 2.1.
+ * This file is part of OpenOffice.org.
  *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
  *
- *    GNU Lesser General Public License Version 2.1
- *    =============================================
- *    Copyright 2005 by Sun Microsystems, Inc.
- *    901 San Antonio Road, Palo Alto, CA 94303, USA
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
  *
- *    This library is free software; you can redistribute it and/or
- *    modify it under the terms of the GNU Lesser General Public
- *    License version 2.1, as published by the Free Software Foundation.
- *
- *    This library is distributed in the hope that it will be useful,
- *    but WITHOUT ANY WARRANTY; without even the implied warranty of
- *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- *    Lesser General Public License for more details.
- *
- *    You should have received a copy of the GNU Lesser General Public
- *    License along with this library; if not, write to the Free Software
- *    Foundation, Inc., 59 Temple Place, Suite 330, Boston,
- *    MA  02111-1307  USA
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org.  If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
  *
  ************************************************************************/

 #ifndef _SVTOOLS_STATUSBARCONTROLLER_HXX
 #define _SVTOOLS_STATUSBARCONTROLLER_HXX

-#ifndef INCLUDED_SVTDLLAPI_H
 #include "svtools/svtdllapi.h"
-#endif
-
-#ifndef _COM_SUN_STAR_LANG_XMULTISERVICEFACTORY_HPP_
 #include <com/sun/star/lang/XMultiServiceFactory.hpp>
-#endif
-
-#ifndef _COM_SUN_STAR_LANG_XINITIALIZATION_HPP_
 #include <com/sun/star/lang/XInitialization.hpp>
-#endif
-
-#ifndef _COM_SUN_STAR_UTIL_XUPDATABLE_HPP_
 #include <com/sun/star/util/XUpdatable.hpp>
-#endif
-
-#ifndef _COM_SUN_STAR_FRAME_XFRAME_HPP_
 #include <com/sun/star/frame/XFrame.hpp>
-#endif
-
-#ifndef _COM_SUN_STAR_FRAME_XDISPATCH_HPP_
 #include <com/sun/star/frame/XDispatch.hpp>
-#endif
-
-#ifndef _COM_SUN_STAR_FRAME_XSTATUSLISTENER_HPP_
 #include <com/sun/star/frame/XStatusListener.hpp>
-#endif
-
-#ifndef _COM_SUN_STAR_FRAME_XSTATUSBARCONTROLLER_HPP_
 #include <com/sun/star/frame/XStatusbarController.hpp>
-#endif
-
-#ifndef _COM_SUN_STAR_UTIL_XURLTRANSFORMER_HPP_
 #include <com/sun/star/util/XURLTransformer.hpp>
-#endif
-
-#ifndef _COM_SUN_STAR_FRAME_XLAYOUTMANAGER_HPP_
 #include <com/sun/star/frame/XLayoutManager.hpp>
-#endif
-
-#ifndef _CPPUHELPER_WEAK_HXX_
 #include <cppuhelper/weak.hxx>
-#endif
-
-#ifndef _CPPUHELPER_INTERFACECONTAINER_HXX_
 #include <cppuhelper/interfacecontainer.hxx>
-#endif
-
-#ifndef _COMPHELPER_BROADCASTHELPER_HXX_
 #include <comphelper/broadcasthelper.hxx>
-#endif

 #ifndef INCLUDED_HASH_MAP
 #include <hash_map>


- Make sure that the toolbar filter actions are also disabled right after starting up
- Remove some code that doesn't seem to do anything meaningful
- Put the last line of one function back as the last line

svn path=/trunk/KDE/kdepim/; revision=818437

--- kmail/kmmainwidget.cpp
+++ kmail/kmmainwidget.cpp
@@ -249,10 +249,6 @@

   toggleSystemTray();

-  // must be the last line of the constructor:
-  mStartupDone = true;
-
-
   KMainWindow *mainWin = dynamic_cast<KMainWindow*>(topLevelWidget());
   KStatusBar *sb =  mainWin ? mainWin->statusBar() : 0;
   mVacationScriptIndicator = new KMail::StatusBarLabel( sb );
@@ -260,6 +256,9 @@
   connect( mVacationScriptIndicator, SIGNAL(clicked()), SLOT(slotEditVacation()) );
   if ( GlobalSettings::checkOutOfOfficeOnStartup() )
     QTimer::singleShot( 0, this, SLOT(slotCheckVacation()) );
+
+  // must be the last line of the constructor:
+  mStartupDone = true;
 }

@@ -636,29 +635,9 @@
     layoutSplitters();
   }

-  if ( mStartupDone ) {
-
-    // Update systray
-    toggleSystemTray();
-
-    mFolderTree->showFolder( mFolder );
-
-    // sanders - New code
-    mHeaders->setFolder(mFolder);
-    if (mMsgView) {
-      int aIdx = mHeaders->currentItemIndex();
-      if (aIdx != -1)
-        mMsgView->setMsg( mFolder->getMsg(aIdx), true );
-      else
-        mMsgView->clear( true );
-    }
-    updateMessageActions();
-    show();
-    // sanders - Maybe this fixes a bug?
-
-  }
   updateMessageMenu();
   updateFileMenu();
+  toggleSystemTray();
   setUpdatesEnabled( true );
 }

@@ -3669,6 +3648,12 @@
   if ( mFolderTree ) {
     mFolderTree->showFolder( startup );
   }
+
+  // Update the message actions. This needs to be done here, since above, we
+  // add the filter actions to the toolbar, and updateMessageActions() takes
+  // care of disabling them in no message is selected (i.e. the startup folder
+  // is empty).
+  updateMessageActions();
 }

 void KMMainWidget::slotShowTip()


Oops, I originally had ramped the vasi/papi color transition the wrong way. So as you passed through the target glide slope from low to high it would be colored: red -> white -> small range of transition to red -> white. Now it goes the right way so you get: red -> smooth transition to -> white. You can tell you are getting high if you see the bottom vasi start to turn pink ... etc. etc. hopefully just like in real life.

--- simgear/scene/tgdb/vasi.hxx
+++ simgear/scene/tgdb/vasi.hxx
@@ -82,7 +82,7 @@
             if ( angle_deg < ref - trans ) {
                 color = 0.0;
             } else if ( angle_deg < ref + trans ) {
-                color = (ref + trans - angle_deg) * (1 / (2 * trans) );
+                color = 1.0 - (ref + trans - angle_deg) * (1 / (2 * trans) );
             } else {
                 color = 1.0;
             }
@@ -97,7 +97,7 @@
             if ( angle_deg < ref - trans ) {
                 color = 0.0;
             } else if ( angle_deg < ref + trans ) {
-                color = (ref + trans - angle_deg) * (1 / (2 * trans) );
+                color = 1.0 - (ref + trans - angle_deg) * (1 / (2 * trans) );
             } else {
                 color = 1.0;
             }
@@ -112,7 +112,7 @@
             if ( angle_deg < ref - trans ) {
                 color = 0.0;
             } else if ( angle_deg < ref + trans ) {
-                color = (ref + trans - angle_deg) * (1 / (2 * trans) );
+                color = 1.0 - (ref + trans - angle_deg) * (1 / (2 * trans) );
             } else {
                 color = 1.0;
             }
@@ -127,7 +127,7 @@
             if ( angle_deg < ref - trans ) {
                 color = 0.0;
             } else if ( angle_deg < ref + trans ) {
-                color = (ref + trans - angle_deg) * (1 / (2 * trans) );
+                color = 1.0 - (ref + trans - angle_deg) * (1 / (2 * trans) );
             } else {
                 color = 1.0;
             }
@@ -142,7 +142,7 @@
             if ( angle_deg < ref - trans ) {
                 color = 0.0;
             } else if ( angle_deg < ref + trans ) {
-                color = (ref + trans - angle_deg) * (1 / (2 * trans) );
+                color = 1.0 - (ref + trans - angle_deg) * (1 / (2 * trans) );
             } else {
                 color = 1.0;
             }
@@ -157,7 +157,7 @@
             if ( angle_deg < ref - trans ) {
                 color = 0.0;
             } else if ( angle_deg < ref + trans ) {
-                color = (ref + trans - angle_deg) * (1 / (2 * trans) );
+                color = 1.0 - (ref + trans - angle_deg) * (1 / (2 * trans) );
             } else {
                 color = 1.0;
             }


#81018# no \x<number> for the regexpr search - the new engine does not support this anymore

--- svtools/source/control/fmtfield.cxx
+++ svtools/source/control/fmtfield.cxx
@@ -2,9 +2,9 @@
  *
  *  $RCSfile: fmtfield.cxx,v $
  *
- *  $Revision: 1.6 $
- *
- *  last change: $Author: fs $ $Date: 2000-11-17 09:20:40 $
+ *  $Revision: 1.7 $
+ *
+ *  last change: $Author: fs $ $Date: 2000-12-07 14:14:36 $
  *
  *  The Contents of this file are made available subject to the terms of
  *  either of the following licenses
@@ -111,7 +111,7 @@
 // regulaerer Ausdruck, um komplette Zahlen und alles, was waehrend der Eingabe einer kompletten Zahl als Fragment vorkommt,
 // abzudecken :
 // [+/-][{ziffer}*.]*{ziffer}*[,{ziffer}*][e[+/-]{ziffer}*]
-const char __FAR_DATA szNumericInput[] = "_[\\x2D\\x2B]?([0-9]*\\x++)*[0-9]*(\\x##[0-9]*)?(e[\\x2D\\x2B]?[0-9]*)?_";
+const char __FAR_DATA szNumericInput[] = "_[-+]?([0-9]*\\,)*[0-9]*(\\.[0-9]*)?(e[-+]?[0-9]*)?_";
     // (die beiden _ sind fuer die Normierung, damit kann ich erzwingen, dass nie ein Teilstring gefunden wird)

 //==============================================================================
@@ -878,7 +878,6 @@
     String sDescription = String::CreateFromAscii(szNumericInput);
     // the thousands and the decimal separator are language dependent
     const SvNumberformat* pFormatEntry = ImplGetFormatter()->GetEntry(m_nFormatKey);
-    char cSepHexCode[3];

     unsigned char cSeparatorThousand = ',';
     unsigned char cSeparatorDecimal = '.';
@@ -891,19 +890,19 @@
         String sSeparator = aLocaleInfo.getNumThousandSep();
         if (sSeparator.Len())
             cSeparatorThousand = sSeparator.GetBuffer()[0];
-        // TODO: for real unicode we need the possibility to search for regular expressions allowing something like "\x????"
-        // (4 digits instead of 2)

         sSeparator = aLocaleInfo.getNumDecimalSep();
         if (sSeparator.Len())
             cSeparatorDecimal = sSeparator.GetBuffer()[0];
     }

-    sprintf(cSepHexCode, "%0X", cSeparatorThousand);
-    sDescription.SearchAndReplaceAscii("++", String::CreateFromAscii(cSepHexCode));
-
-    sprintf(cSepHexCode, "%0X", cSeparatorDecimal);
-    sDescription.SearchAndReplaceAscii("##", String::CreateFromAscii(cSepHexCode));
+    String sReplaceWith((sal_Unicode)'\\');
+    sReplaceWith += (sal_Unicode)cSeparatorThousand;
+    sDescription.SearchAndReplaceAscii("\\,", sReplaceWith);
+
+    sReplaceWith = (sal_Unicode)'\\';
+    sReplaceWith += (sal_Unicode)cSeparatorDecimal;
+    sDescription.SearchAndReplaceAscii("\\.", sReplaceWith);

     delete m_pConformanceTester;


New practice.

New practice.


Fix bug #237596  mail search does not honour locale settings for the date
BUG: 237596

svn path=/branches/KDE/4.4/kdepim/; revision=1127642

--- kmail/searchwindow.cpp
+++ kmail/searchwindow.cpp
@@ -586,7 +586,7 @@
   QTreeWidgetItem *newItem = new QTreeWidgetItem( mLbxMatches );
   newItem->setText( 0, msg->subject() );
   newItem->setText( 1, from );
-  newItem->setText( 2, msg->dateIsoStr() );
+  newItem->setText( 2, msg->dateStr() );
   newItem->setText( 3, fName );
   newItem->setText( 4,QString::number( mFolder->serNum( idx ) ) );
   mLbxMatches->addTopLevelItem( newItem );


app/core/internal: template_transform(): support comment block.

--- app/core/src/pickle/app_core/internal.cpp
+++ app/core/src/pickle/app_core/internal.cpp
@@ -180,6 +180,10 @@
 			TX_OUT_ELEM("__INCLUDE(");
 			TX_OUT(content);
 			TX_OUT(")\n");
+			goto l_block_end;
+
+		case '#':
+			TX_FIND_BLOCK_TAIL("#}");
 			goto l_block_end;

 		l_block_end:


Whitespace cleanup

Whitespace cleanup

--- svtools/source/graphic/grfcache.hxx
+++ svtools/source/graphic/grfcache.hxx
@@ -43,66 +43,107 @@
 {
 private:

-    GraphicManager&             mrMgr;
-    Timer                       maReleaseTimer;
-    List                        maGraphicCache;
-    List                        maDisplayCache;
-    sal_uLong                       mnReleaseTimeoutSeconds;
-    sal_uLong                       mnMaxDisplaySize;
-    sal_uLong                       mnMaxObjDisplaySize;
-    sal_uLong                       mnUsedDisplaySize;
+    GraphicManager&         mrMgr;
+    Timer                   maReleaseTimer;
+    List                    maGraphicCache;
+    List                    maDisplayCache;
+    sal_uLong               mnReleaseTimeoutSeconds;
+    sal_uLong               mnMaxDisplaySize;
+    sal_uLong               mnMaxObjDisplaySize;
+    sal_uLong               mnUsedDisplaySize;

-    sal_Bool                        ImplFreeDisplayCacheSpace( sal_uLong nSizeToFree );
-    GraphicCacheEntry*          ImplGetCacheEntry( const GraphicObject& rObj );
+    sal_Bool                ImplFreeDisplayCacheSpace( sal_uLong nSizeToFree );
+    GraphicCacheEntry*      ImplGetCacheEntry( const GraphicObject& rObj );

-                                DECL_LINK( ReleaseTimeoutHdl, Timer* pTimer );
+                            DECL_LINK( ReleaseTimeoutHdl, Timer* pTimer );

 public:

-                                GraphicCache( GraphicManager& rMgr,
-                                              sal_uLong nDisplayCacheSize = 10000000UL,
-                                              sal_uLong nMaxObjDisplayCacheSize = 2400000UL );
-                                ~GraphicCache();
+                            GraphicCache(
+                                GraphicManager& rMgr,
+                                sal_uLong nDisplayCacheSize = 10000000UL,
+                                sal_uLong nMaxObjDisplayCacheSize = 2400000UL
+                            );
+
+                            ~GraphicCache();

 public:

-    void                        AddGraphicObject( const GraphicObject& rObj, Graphic& rSubstitute,
-                                                  const ByteString* pID, const GraphicObject* pCopyObj );
-    void                        ReleaseGraphicObject( const GraphicObject& rObj );
+    void                    AddGraphicObject(
+                                const GraphicObject& rObj,
+                                Graphic& rSubstitute,
+                                const ByteString* pID,
+                                const GraphicObject* pCopyObj
+                            );

-    void                        GraphicObjectWasSwappedOut( const GraphicObject& rObj );
-    sal_Bool                        FillSwappedGraphicObject( const GraphicObject& rObj, Graphic& rSubstitute );
-    void                        GraphicObjectWasSwappedIn( const GraphicObject& rObj );
+    void                    ReleaseGraphicObject( const GraphicObject& rObj );

-    ByteString                  GetUniqueID( const GraphicObject& rObj ) const;
+    void                    GraphicObjectWasSwappedOut( const GraphicObject& rObj );
+    sal_Bool                FillSwappedGraphicObject( const GraphicObject& rObj, Graphic& rSubstitute );
+    void                    GraphicObjectWasSwappedIn( const GraphicObject& rObj );
+
+    ByteString              GetUniqueID( const GraphicObject& rObj ) const;

 public:

-    void                        SetMaxDisplayCacheSize( sal_uLong nNewCacheSize );
-    sal_uLong                       GetMaxDisplayCacheSize() const { return mnMaxDisplaySize; };
+    void                    SetMaxDisplayCacheSize( sal_uLong nNewCacheSize );
+    sal_uLong               GetMaxDisplayCacheSize() const { return mnMaxDisplaySize; };

-    void                        SetMaxObjDisplayCacheSize( sal_uLong nNewMaxObjSize, sal_Bool bDestroyGreaterCached = sal_False );
-    sal_uLong                       GetMaxObjDisplayCacheSize() const { return mnMaxObjDisplaySize; }
+    void                    SetMaxObjDisplayCacheSize(
+                                sal_uLong nNewMaxObjSize,
+                                sal_Bool bDestroyGreaterCached = sal_False
+                            );

-    sal_uLong                       GetUsedDisplayCacheSize() const { return mnUsedDisplaySize; }
-    sal_uLong                       GetFreeDisplayCacheSize() const { return( mnMaxDisplaySize - mnUsedDisplaySize ); }
+    sal_uLong               GetMaxObjDisplayCacheSize() const { return mnMaxObjDisplaySize; }

-    void                        SetCacheTimeout( sal_uLong nTimeoutSeconds );
-    sal_uLong                       GetCacheTimeout() const { return mnReleaseTimeoutSeconds; }
+    sal_uLong               GetUsedDisplayCacheSize() const { return mnUsedDisplaySize; }
+    sal_uLong               GetFreeDisplayCacheSize() const { return( mnMaxDisplaySize - mnUsedDisplaySize ); }

-    sal_Bool                        IsDisplayCacheable( OutputDevice* pOut, const Point& rPt, const Size& rSz,
-                                                    const GraphicObject& rObj, const GraphicAttr& rAttr ) const;
-    sal_Bool                        IsInDisplayCache( OutputDevice* pOut, const Point& rPt, const Size& rSz,
-                                                  const GraphicObject& rObj, const GraphicAttr& rAttr ) const;
-    sal_Bool                        CreateDisplayCacheObj( OutputDevice* pOut, const Point& rPt, const Size& rSz,
-                                                       const GraphicObject& rObj, const GraphicAttr& rAttr,
-                                                       const BitmapEx& rBmpEx );
-    sal_Bool                        CreateDisplayCacheObj( OutputDevice* pOut, const Point& rPt, const Size& rSz,
-                                                       const GraphicObject& rObj, const GraphicAttr& rAttr,
-                                                       const GDIMetaFile& rMtf );
-    sal_Bool                        DrawDisplayCacheObj( OutputDevice* pOut, const Point& rPt, const Size& rSz,
-                                                     const GraphicObject& rObj, const GraphicAttr& rAttr );
+    void                    SetCacheTimeout( sal_uLong nTimeoutSeconds );
+    sal_uLong               GetCacheTimeout() const { return mnReleaseTimeoutSeconds; }
+
+    sal_Bool                IsDisplayCacheable(
+                                OutputDevice* pOut,
+                                const Point& rPt,
+                                const Size& rSz,
+                                const GraphicObject& rObj,
+                                const GraphicAttr& rAttr
+                            ) const;
+
+    sal_Bool                IsInDisplayCache(
+                                OutputDevice* pOut,
+                                const Point& rPt,
+                                const Size& rSz,
+                                const GraphicObject& rObj,
+                                const GraphicAttr& rAttr
+                            ) const;
+
+    sal_Bool                CreateDisplayCacheObj(
+                                OutputDevice* pOut,
+                                const Point& rPt,
+                                const Size& rSz,
+                                const GraphicObject& rObj,
+                                const GraphicAttr& rAttr,
+                                const BitmapEx& rBmpEx
+                            );
+
+    sal_Bool                CreateDisplayCacheObj(
+                                OutputDevice* pOut,
+                                const Point& rPt,
+                                const Size& rSz,
+                                const GraphicObject& rObj,
+                                const GraphicAttr& rAttr,
+                                const GDIMetaFile& rMtf
+                            );
+
+    sal_Bool                DrawDisplayCacheObj(
+                                OutputDevice* pOut,
+                                const Point& rPt,
+                                const Size& rSz,
+                                const GraphicObject& rObj,
+                                const GraphicAttr& rAttr
+                            );
 };

 #endif // _GRFCACHE_HXX


Reducing throttler rate in test so that it passes with asan

Summary: Reducing throttler rate in test so that it passes with asan

Reviewed By: ldemailly

Differential Revision: D3861060

fbshipit-source-id: f575fe636f90b4781fd1c3388cb31a5bd3c1a502

--- test/ThrottlerTest.cpp
+++ test/ThrottlerTest.cpp
@@ -11,33 +11,33 @@
 void testThrottling(std::shared_ptr<Throttler> throttler, int expectedRate) {
   int64_t numTransferred = 0;
   auto startTime = Clock::now();
-  while (durationSeconds(Clock::now() - startTime) < 2) {
+  while (durationSeconds(Clock::now() - startTime) <= 2) {
     throttler->limit(1000);
     numTransferred += 1000;
   }
   auto endTime = Clock::now();
   double durationSecs = durationSeconds(endTime - startTime);
   double throughputMBps = numTransferred / durationSecs / kMbToB;
-  EXPECT_NEAR(throughputMBps, expectedRate, 3);
+  EXPECT_NEAR(throughputMBps, expectedRate, 1);
 }

 TEST(ThrottlerTest, RATE_CHANGE) {
   WdtOptions options;
-  options.avg_mbytes_per_sec = 500;
+  options.avg_mbytes_per_sec = 50;
   std::shared_ptr<Throttler> throttler = Throttler::makeThrottler(options);
   throttler->startTransfer();

-  testThrottling(throttler, 500);
+  testThrottling(throttler, 50);

   // test rate decrease
-  options.avg_mbytes_per_sec = 300;
+  options.avg_mbytes_per_sec = 30;
   throttler->setThrottlerRates(options);
-  testThrottling(throttler, 300);
+  testThrottling(throttler, 30);

   // test rate increase
-  options.avg_mbytes_per_sec = 700;
+  options.avg_mbytes_per_sec = 70;
   throttler->setThrottlerRates(options);
-  testThrottling(throttler, 700);
+  testThrottling(throttler, 70);

   throttler->endTransfer();
 }


INTEGRATION: CWS sw241bf02_DEV300 (1.6.96.1.22); FILE MERGED 2008/04/30 09:18:44 od 1.6.96.1.22.1: #i87808# if the style access iterator is used to retrieve stored styles, 	 try to provide used styles, if at a certain style pool node 	 are stored more than one style due to non-poolable items

--- svtools/source/items1/stylepool.cxx
+++ svtools/source/items1/stylepool.cxx
@@ -7,7 +7,7 @@
  * OpenOffice.org - a multi-platform office productivity suite
  *
  * $RCSfile: stylepool.cxx,v $
- * $Revision: 1.8 $
+ * $Revision: 1.9 $
  *
  * This file is part of OpenOffice.org.
  *
@@ -59,12 +59,36 @@
             pItem( rItem.Clone() ), pUpper( pParent ){}
         ~Node();
         const bool hasItemSet() const { return 0 < aItemSet.size(); }
-        const StylePool::SfxItemSet_Pointer_t getItemSet() const { return aItemSet[aItemSet.size()-1]; }
+        // --> OD 2008-04-29 #i87808#
+//        const StylePool::SfxItemSet_Pointer_t getItemSet() const { return aItemSet[aItemSet.size()-1]; }
+        const StylePool::SfxItemSet_Pointer_t getItemSet() const
+        {
+            return aItemSet.back();
+        }
+        const StylePool::SfxItemSet_Pointer_t getUsedOrLastAddedItemSet() const;
+        // <--
         void setItemSet( const SfxItemSet& rSet ){ aItemSet.push_back( StylePool::SfxItemSet_Pointer_t( rSet.Clone() ) ); }
         Node* findChildNode( const SfxPoolItem& rItem );
         Node* nextItemSet( Node* pLast );
         const SfxPoolItem& getPoolItem() const { return *pItem; }
     };
+
+    // --> OD 2008-04-29 #i87808#
+    const StylePool::SfxItemSet_Pointer_t Node::getUsedOrLastAddedItemSet() const
+    {
+        std::vector< StylePool::SfxItemSet_Pointer_t >::const_reverse_iterator aIter;
+
+        for ( aIter = aItemSet.rbegin(); aIter != aItemSet.rend(); ++aIter )
+        {
+            if ( (*aIter).use_count() > 1 )
+            {
+                return *aIter;
+            }
+        }
+
+        return aItemSet.back();
+    }
+    // <--

     Node* Node::findChildNode( const SfxPoolItem& rItem )
     {
@@ -157,11 +181,21 @@
                 pNode = &pCurrNode->second;
                 ++pCurrNode;
                 if( pNode->hasItemSet() )
-                    return pNode->getItemSet();
+                {
+                    // --> OD 2008-04-30 #i87808#
+//                    return pNode->getItemSet();
+                    return pNode->getUsedOrLastAddedItemSet();
+                    // <--
+                }
             }
             pNode = pNode->nextItemSet( pNode );
             if( pNode && pNode->hasItemSet() )
-                return pNode->getItemSet();
+            {
+                // --> OD 2008-04-30 #i87808#
+//                return pNode->getItemSet();
+                return pNode->getUsedOrLastAddedItemSet();
+                // <--
+            }
         }
         return pReturn;
     }
@@ -170,7 +204,12 @@
     {
         ::rtl::OUString aString;
         if( pNode && pNode->hasItemSet() )
-            aString = StylePool::nameOf( pNode->getItemSet() );
+        {
+            // --> OD 2008-04-30 #i87808#
+//            aString = StylePool::nameOf( pNode->getItemSet() );
+            aString = StylePool::nameOf( pNode->getUsedOrLastAddedItemSet() );
+            // <--
+        }
         return aString;
     }


INTEGRATION: CWS dba24b (1.6.480); FILE MERGED 2007/09/04 21:44:21 fs 1.6.480.1: during #i73237#: slight refactoring

--- svx/source/form/sqlparserclient.cxx
+++ svx/source/form/sqlparserclient.cxx
@@ -4,9 +4,9 @@
  *
  *  $RCSfile: sqlparserclient.cxx,v $
  *
- *  $Revision: 1.6 $
+ *  $Revision: 1.7 $
  *
- *  last change: $Author: obo $ $Date: 2006-09-17 05:13:37 $
+ *  last change: $Author: hr $ $Date: 2007-11-01 14:59:17 $
  *
  *  The Contents of this file are made available subject to
  *  the terms of GNU Lesser General Public License Version 2.1.
@@ -58,13 +58,12 @@
         m_xORB = _rxORB;
     }
     //--------------------------------------------------------------------
-    //add by BerryJia for fixing Bug97420 Time:2002-9-12-11:00(PRC time)
-    void OSQLParserClient::create() const
+    bool OSQLParserClient::ensureLoaded() const
     {
-        if (!getFactory().is())
-            ODbtoolsClient::create();
-        if (getFactory().is())
-             m_xParser = getFactory()->createSQLParser(m_xORB,getParseContext());
+        if ( !ODbtoolsClient::ensureLoaded() )
+            return false;
+         m_xParser = getFactory()->createSQLParser(m_xORB,getParseContext());
+        return m_xParser.is();
     }

 //........................................................................


Use rtl::OUString::startsWithIgnoreAsciiCase

Change-Id: I889a072bd96b6076966e3aad84e39d3491618912

--- sw/source/core/unocore/unofield.cxx
+++ sw/source/core/unocore/unofield.cxx
@@ -93,8 +93,6 @@

 using namespace ::com::sun::star;
 using namespace nsSwDocInfoSubType;
-
-#define COM_TEXT_FLDMASTER      "com.sun.star.text.FieldMaster."

 // case-corrected version of the first part for the service names (see #i67811)
 #define COM_TEXT_FLDMASTER_CC   "com.sun.star.text.fieldmaster."
@@ -2596,7 +2594,7 @@
   -----------------------------------------------------------------------*/
 static sal_uInt16 lcl_GetIdByName( OUString& rName, OUString& rTypeName )
 {
-    if (rName.startsWith(COM_TEXT_FLDMASTER) || rName.startsWith(COM_TEXT_FLDMASTER_CC))
+    if (rName.startsWithIgnoreAsciiCase(COM_TEXT_FLDMASTER_CC))
         rName = rName.copy(30);

     sal_uInt16 nResId = USHRT_MAX;


<b>foo<b> -> <b>foo</b>

<b>foo<b> -> <b>foo</b>

svn path=/trunk/kdepim/; revision=326662

--- knode/knmainwidget.cpp
+++ knode/knmainwidget.cpp
@@ -162,7 +162,7 @@
                                            0, actionCollection(),
                                            "reset_quicksearch" );
   resetQuickSearch->plug( q_uicksearch );
-  resetQuickSearch->setWhatsThis( i18n( "Reset Quick Search
"
+  resetQuickSearch->setWhatsThis( i18n( "Reset Quick Search
"
                                         "Resets the quick search so that "
                                         "all messages are shown again." ) );


Fix error message

Fix error message

--- service/main.cpp
+++ service/main.cpp
@@ -155,7 +155,7 @@
 int getLidStatus() {
     int fd = open("/proc/acpi/button/lid/LID/state", O_RDONLY);
     if(fd == -1) {
-        syslog(LOG_ERR, "Error opening /sys/bus/acpi/devices/ACPI0008:00/ali");
+        syslog(LOG_ERR, "Error opening /proc/acpi/button/lid/LID/state");
         return -1;
     } else {
         char str[100];


#85925# chapter format corrected

#85925# chapter format corrected

--- sw/source/core/unocore/unofield.cxx
+++ sw/source/core/unocore/unofield.cxx
@@ -2,9 +2,9 @@
  *
  *  $RCSfile: unofield.cxx,v $
  *
- *  $Revision: 1.28 $
+ *  $Revision: 1.29 $
  *
- *  last change: $Author: mtg $ $Date: 2001-04-03 15:07:00 $
+ *  last change: $Author: os $ $Date: 2001-04-10 09:14:30 $
  *
  *  The Contents of this file are made available subject to the terms of
  *  either of the following licenses
@@ -1942,6 +1942,8 @@
                 SwFieldType* pFldType = pDoc->GetSysFldType(RES_CHAPTERFLD);
                 pFld = new SwChapterField((SwChapterFieldType*)pFldType, m_pProps->nUSHORT1);
                 ((SwChapterField*)pFld)->SetLevel(m_pProps->nByte1);
+                Any aVal; aVal <<= (sal_Int16)m_pProps->nUSHORT1;
+                pFld->PutValue(aVal, C2U(UNO_NAME_CHAPTER_FORMAT));
             }
             break;
             case SW_SERVICE_FIELDTYPE_AUTHOR:


remove line from unit test that had no effect, but broke compilation

git-svn-id: 459970da87506910ac315916d0f5985452181198@1478 8dad8b1f-cf64-0410-95b6-bcf113ffbcfe

--- test/check_logtree.cpp
+++ test/check_logtree.cpp
@@ -41,26 +41,26 @@
     int xid = Tbegin();

     Tcommit(xid);
-
+
     xid = Tbegin();
     diskTreeComponent::internalNodes *lt = new diskTreeComponent::internalNodes(xid, 1000, 10000, 40);
-
+
     long oldpagenum = -1;

     std::vector<std::string> arr;
     preprandstr(NUM_ENTRIES, arr, 50, false);
     std::sort(arr.begin(), arr.end(), &mycmp);
-
+
     //for(int i = 0; i < NUM_ENTRIES; i++)
     //{
     //   printf("%s\t", arr[i].c_str());
     //   int keylen = arr[i].length()+1;
-    //  printf("%d\n", keylen);
+    //  printf("%d\n", keylen);
     //}

     printf("Stage 1: Writing %d keys\n", NUM_ENTRIES);
-
+

     for(int i = 0; i < NUM_ENTRIES; i++)
     {
@@ -68,8 +68,8 @@
         byte *currkey = (byte*)malloc(keylen);
         for(int j=0; j<keylen-1; j++)
             currkey[j] = arr[i][j];
-        currkey[keylen-1]='\0';
-
+        currkey[keylen-1]='\0';
+
         //printf("\n#########\ni=%d\nkey:\t%s\nkeylen:%d\n",i,((char*)currkey),keylen);
         long pagenum = lt->findPage(xid, currkey, keylen);
         //printf("pagenum:%d\n", pagenum);
@@ -80,7 +80,7 @@

         pagenum = lt->findPage(xid, currkey,keylen);
         oldpagenum = pagenum;
-        //printf("pagenum:%d\n", pagenum);
+        //printf("pagenum:%d\n", pagenum);
         assert(pagenum == i + OFFSET);
         free(currkey);

@@ -88,7 +88,7 @@
     }

     printf("Writes complete.");
-
+
     Tcommit(xid);
     xid = Tbegin();

@@ -96,7 +96,7 @@
     lt->print_tree(xid);

     printf("Stage 2: Looking up %d keys\n", NUM_ENTRIES);
-
+
     for(int i = 0; i < NUM_ENTRIES; i++) {
         int keylen = arr[i].length()+1;
         byte *currkey = (byte*)malloc(keylen);
@@ -106,7 +106,7 @@

         //printf("\n#########\ni=%d\nkey:\t%s\nkeylen:%d\n",i,((char*)currkey),keylen);
         long pagenum = lt->findPage(xid, currkey, keylen);
-        //printf("pagenum:%d\n", pagenum);
+        //printf("pagenum:%d\n", pagenum);
         assert(pagenum == i + OFFSET);
         free(currkey);
     }
@@ -114,7 +114,7 @@

     printf("Stage 3: Iterating over %d keys\n", NUM_ENTRIES);

-
+
     int64_t count = 0;
     RegionAllocator * ro_alloc = new RegionAllocator();
     diskTreeComponent::internalNodes::iterator * it = new diskTreeComponent::internalNodes::iterator(xid, ro_alloc, lt->get_root_rec());
@@ -123,7 +123,7 @@
         byte * key;
         byte **key_ptr = &key;
         size_t keysize = it->key((byte**)key_ptr);
-
+
         pageid_t *value;
         pageid_t **value_ptr = &value;
         size_t valsize = it->value((byte**)value_ptr);
@@ -152,25 +152,23 @@

     sync();

-    bufferManagerNonBlockingSlowHandleType = IO_HANDLE_PFILE;
-
     Tinit();

     int xid = Tbegin();

     Tcommit(xid);
-
+
     xid = Tbegin();
     diskTreeComponent::internalNodes *lt = new diskTreeComponent::internalNodes(xid, 1000, 10000, 40);
-
+
     long oldpagenum = -1;
-
+
     for(int32_t i = 0; i < NUM_ENTRIES; i++) {
         int keylen = sizeof(int32_t);
         byte *currkey = (byte*)malloc(keylen);
         memcpy(currkey, (byte*)(&i), keylen);
         //currkey[]='\0';
-
+
         printf("\n#########\ni=%d\nkey:\t%d\nkeylen:%d\n",i,*((int32_t*)currkey),keylen);
         pageid_t pagenum = lt->findPage(xid, currkey, keylen);
         printf("pagenum:%lld\n", (long long)pagenum);
@@ -187,13 +185,13 @@
     }

     printf("Writes complete.");
-
+
     Tcommit(xid);
     xid = Tbegin();

     printf("\nTREE STRUCTURE\n");
     lt->print_tree(xid);
-
+
     for(int32_t i = 1; i < NUM_ENTRIES; i++) {
         int keylen = sizeof(int32_t);
         byte *currkey = (byte*)malloc(keylen);
@@ -240,8 +238,8 @@
     insertProbeIter_str(NUM_ENTRIES_A);
     //insertProbeIter_int(NUM_ENTRIES_A);

-
-
+
+
     return 0;
 }